JPanel's wait(long timeout) function

Hey,
I wanted to make a line go across the screen when the user clicks a button. I tried calling the paint(graphics) function in the button's actionPerformed(..) function, in a loop so that it can show the line move across the screen.
in the paint(..) method, I want the line to appear at a location, then I want the panel to wait 1 sec. so everytime teh paint method is called, a new line is drawn, and is now in a location, let's say, 10 pixels from the previous line; then the panel must wait 1 sec before going to the next step.
It should look like a continuous flowing line across the screen.
But when I state, in the paint(..) method:
try{
            wait(1000);
          catch(Exception e){
          }it does not wait the whole 1 second. I know that it must be another component calling the "notify(..)" method, but is there anyway I can make the JPanel wait for a specific amount of time?
How can I solve this ?
thanks ;)

hey thanks for the replies.
I have so far:
int count=0;
int linepos=0;
private void PlayClicked(){
    play=true;
    stop=false;
    if (pause==false){
      linepos=100;
      repaint();
    while (count<15){
      call();
  private void call() {
      linepos=linepos+20;
      try {
         Thread.sleep(100);
      catch (InterruptedException ie) {      }
      repaint();
      try {
         Thread.sleep(100);
      catch (InterruptedException ie) {      }
      repaint();
   }and in paint(..) I have
if (play || pause) {
          g.drawLine(linepos,300,linepos,500);
}K my prob is that now, the thread completely stops until the last loop cycle, so that I only see the last position of the line.
I first tried to make the thread sleep only once, but what I figured was that it sleeps, then it takes a very small time to set the new location, so it seems as if it automatically sleeps again (in the next cycle of the loop). so if i made it sleep twice, once after the new location has been set, and once after the repaint has been called, it would show the line.
but it doesnt work. :s
is there another way of doing this ? :)
thanks :D

Similar Messages

  • Database queries - is there a wait or sleep functionality?

    Hello everyone,
    I have recently encountered a problem where a database collector I made
    just stops querying after a while and needs restarting in the ESM for it
    to work again. In other databases (I am querying Oracle btw), this does
    not happen and in some others it does. So I am basically thinking that
    some databases are configured to limit the amount of querying or force
    an exit on error.
    What I have noticed, is that in my Oracle environment (no fancy
    configurations, all very permissive) I get alot of ORA-0100 errors
    indicating that there are too many open cursors. This happens when the
    last row in the database has been reached and the errors stop being
    shown in Active Views only after some data is inserted in database and
    collector resumes normally the task of collecting data until no more
    records are available and once more errors appear in Active Views.
    I altered the amount of allowed open cursors and incremented from 300
    to 500. Still, I keep getting errors (like every 20 seconds). I want to
    minimize these amount of errors and hopefully solve my original problem
    of having to manually restart the collector in some customer
    environments. I came up with the following snippet (bottom of message),
    but can't seem to find a function for having the collector sleep or
    wait. I tried Thread.sleep() (From Java) and setTimeout() (From
    Javascript) but both raise errors since they are undefined methods for
    the collector.
    The Sentinel API makes reference to "queryDelay" and "queryScheduled"
    flags which are supposedly defined in sqlquery.js. I cannot find any
    reference in the code to these flags and I am not even sure of how to
    implement them ( if(!queryDelay) { conn.send(DBQUERY) } ?????? ).
    How can I use these flags in the code to help me reduce the number of
    queries being thrown when there is no data? Or will I have to hack my
    own sleep or wait function? I appreciate any assistance!
    snippet of code I want to implement:
    Code:
    Connector.prototype.sendQuery = function(){
    if (rec.CONNECTION_STATUS == "NEED-QUERY") {
    if (instance.CONFIG.myCounter >= 3) {
    //HERE INSERT A SLEEP OR TIMEOUT FUNCTION
    instance.CONFIG.myCounter = 0;
    } else {
    conn.send(instance.CONFIG.DBQuery);
    //instanced in initialization function. Resets to zero when query is successful.
    instance.CONFIG.myCounter = instance.CONFIG.myCounter + 1;
    return true
    Jean-Paul_GM
    Jean-Paul_GM's Profile: http://forums.novell.com/member.php?userid=12809
    View this thread: http://forums.novell.com/showthread.php?t=445597

    I experience the same problem with my custom collector.
    But the beta connector is not there anymore.
    Can you please provide the connector so that I can test if it solves my
    problem.
    Thanks.
    ab;2141610 Wrote:
    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    > If this works I'd like you to open an SR for it so we can link it to
    > the
    > bug, but in the meantime:
    >
    > 508a0b25988c98a152ff5889edb41882 jdbc2011.1r1beta2.tar.gz
    >
    > ftp://ftp.novell.com/outgoing/jdbc2011.1r1beta2.tar.gz
    >
    > This is a beta and has not been fully ZA'd but seems to resolve your
    > issue for another customer. If it does please be sure to at least
    > post
    > back here if not open an SR (which will be credited to you as this is
    > Bug# 700669 most likely).
    >
    > Good luck.
    >
    > - --
    > Want to yell at me in person?
    > Come to BrainShare 2011 in October: http://tinyurl.com/brainshare2011
    > -----BEGIN PGP SIGNATURE-----
    > Version: GnuPG v2.0.15 (GNU/Linux)
    > Comment: Using GnuPG with Mozilla - 'Enigmail: A simple interface for
    > OpenPGP email security' (http://enigmail.mozdev.org/)
    >
    > iQIcBAEBAgAGBQJOge8eAAoJEF+XTK08PnB5ORoQAJcX9moFMh AfcpLSaIVhFLFj
    > ZcmfRjJs4IyT+xatk9wp1S/+eq81AMuyxsoGK/RQfwkKQtzJWiUtQAulCVPjFJZP
    > 3Hy2yBAJYUe5Rm3kedfeFlW3vFIV7wecl4el1UPRs4Q9DBUuBa XqP1KHgDrx4iue
    > ECEph0scQmlp+SxeBUZKfVwWY9NRKio3kxRPJ3QmzPPQ8euP6Z RYcDtwfJq4rrQf
    > z8GcV4ylHZxgIqGXI2pV47zBPPuU/lppytAnyaZSQm5ODs1ndi8f7i/MLPZ4SGI4
    > rkjUURVmkYim7UOA6QLxYUxUJF5SDGyjyJS2h2wGb5caBACMsA XDeySZ6ARMxtqs
    > 9mzb+Zj3VC4+54yVFAXDUq7mzMa5NE0WqxTR9lNoBMnnLmjwyk b9YDfmDUFZCpmT
    > QtWM68bgqtl/p1kcjQq0yAsTVTniGsOynpfTvZjsi4Y4hDCC9ktf8HP7aqu+Tb Nn
    > ehVYbG8zM8muUfiAEMTfjm7X07DK5uTTduNnnCbysnvNcCdRlu SEinfZsDRiihEt
    > gdoYFRYicy3SrJTL769TlzlKd3LU8ICqy8fnHLVeJjPanWxRCQ ISFUuhb5NI1h8Q
    > unVZAzHzcpJCidMLm/cOpCVbyPeaTeG3HbQzNOqwKyd4FFfHvzIBh0JVzO2uCScf
    > nvoosfhMydAkj0sgWXvH
    > =AVMR
    > -----END PGP SIGNATURE-----
    hkalyoncu
    hkalyoncu's Profile: http://forums.novell.com/member.php?userid=63527
    View this thread: http://forums.novell.com/showthread.php?t=445597

  • DelayQueue poll(long timeout, TimeUnit unit) not working

    Im trying to test out using a DelayQueue but the poll method dosen't seem to be working properly. The docs say...
    E poll(long timeout, TimeUnit unit)
    Retrieves and removes the head of this queue, waiting if necessary up to the specified wait time if no elements with an unexpired delay are present on this queue.
    The specified wait time is one second and the elements are delayed a lot longer than that.
    Also my last if statement within the compareTo() method. What can I do to fix it? I had to add in the last return because I guess all the above return's are within conditional statements. Thanks.
    import java.util.concurrent.Delayed;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.DelayQueue;
    public class DelayTest{
    public static void main(String[] args){
      DelayQueue<DelayedElement> dq = new DelayQueue<DelayedElement>();
      dq.put(new DelayedElement(10));
      dq.put(new DelayedElement(20));
      dq.put(new DelayedElement(5));
    try{
      DelayedElement de = dq.take();
      //DelayedElement de = dq.poll(1, TimeUnit.SECONDS);
      // System.out.println(de.getDelayTime());
    }catch(InterruptedException ie){
      System.err.println(ie);
    class DelayedElement implements Delayed, Comparable<Delayed>{
    private long delay;
    public long getDelay(TimeUnit unit){
    long d = unit.convert(delay - (System.currentTimeMillis() / 1000), TimeUnit.SECONDS);
      System.out.println(delay);
      return delay;
    public DelayedElement(long delay){
      this.delay = delay;
    public long getDelayTime(){
        return delay;
    public int compareTo(Delayed other){
      if(other == this)
       return 0;
       DelayedElement x = (DelayedElement)other;
       long diff = delay - x.delay;
       if(diff < 0)
        return -1;
       else if (diff > 0)
        return 1;
        return 1;
    }

    Scrap that last question. I made some mods to the code and I switched to using take() which blocks. Problem is that take() is blocking forever. Can anyone see what I am doing wrong?
    import java.util.concurrent.Delayed;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.DelayQueue;
    public class DelayTest{
    public static void main(String[] args){
      DelayQueue<DelayedElement> dq = new DelayQueue<DelayedElement>();
      dq.put(new DelayedElement(10));
      dq.put(new DelayedElement(20));
      dq.put(new DelayedElement(5));
    while(true){
      try{ 
      // DelayedElement de = dq.poll(); // if this queue has no elements with an unexpired delay no blocking  
       DelayedElement de = dq.take(); // waits for an expired element then remove head of queue
       if(de == null) break;
        System.out.println(de.getDelayTime());
       }catch(InterruptedException ie){
       System.err.println(ie);
    class DelayedElement implements Delayed, Comparable<Delayed>{
    private long delay;
    public long getDelay(TimeUnit unit){
      long d = unit.convert(delay, TimeUnit.MILLISECONDS);
      return d;
    public DelayedElement(long delay){
      this.delay = delay;
    public long getDelayTime(){
      return delay;
    public int compareTo(Delayed other){
      if(other == this)
       return 0;
       DelayedElement x = (DelayedElement)other;
       long diff = delay - x.delay;
       if(diff < 0){
        return -1;
        return 1;  // diff > 0
    }

  • Force "Wait on Occurrence" function to stop waiting

    Hi all,
    is it possible to interrupt the "Wait on Occurrence" function, so that it stops waiting?
    That's my situation:
    In my VI, I'm using occurrences to get event messages from the windows API. See here: http://www.ni.com/example/29394/en/ for an example code. One part is a DLL which takes the reference of the occurrence and sets an occurrence each times an event happens (e.g. mouse down, etc.). In the case, the VI is closed it's necessary to abort waiting to the occurrence immediately, otherwise the application becomes idle until any event happens.
    Solved!
    Go to Solution.

    I haven't looked at the code in years, so I don't really remembers what it looks like, but what's preventing you from splitting the occurence wire to the point where you know the VI stops and setting the occurence there? Obviously, this will cause your code to think that an event occured, so you might need to add another mechanism to mark that this is not the case, but it should be doable.
    Another alternative is to use the timeout. Obviously, this will make it poll, with all the implications of that, so that's up to you.
    A third option is to add a layer between the occurence and your actual code, which is basically what Nathan suggested, but this suggestion is for doing it on the LV side instead of in the DLL. This doesn't solve the issue you're having (you would still need to write the code to handle it) and it makes the system more complicated, but it can make the API that your final code sees more clean (e.g. using two events). Depending on what the code looks like, this might require some daemons, etc., so you might not want this.
    Try to take over the world!

  • Number of characters in long text functionality

    Can anyone please help me as to how many characters are there in long text functionality in Standard SAP. If we create a document under FB01 , there is a long text field how many characters we can enter in that text field.
    Also can we have any number of characters in custom field or is there any restriction to it.

    Hi Isha,
    Please refer the solution for your problem on this link :
    Here i have explained in detail how you can go about with providing Custom Controls on the screen.
    [Re: long text in custom screen]
    Hope this helps.
    Regards,
    Samreen.

  • Can anyone explain "ignore previous" feature of Wait on Notification function?

    Can anyone explain "ignore previous" feature of Wait on Notification function?  I have read the help description and other material and I just don't get it.  Reference to any good articles I can read will be appreciated.
    Thanks in advance.

    Hi VI Joe,
    if the "ignore previous" input is true, then you only get the notifiers which arrive if you are waiting in the "Wait on Notifiacation" function. If there is a notifier before this function is executed, then you don't see it.
    Edit: See the attached example. If the constant is true, then the vi will wait on a notification because the previous is ignored, if the constant is false, then it receives the notifier. 
    Hope it helps.
    Mike
    Message Edited by MikeS81 on 06-26-2009 02:36 PM
    Attachments:
    Notifier_LV85.vi ‏9 KB

  • Notes - Standard Function Modules long text functionality

    Hi All
    Need standard Function Modules for Notes (long text) functionality. I need to create a notes tab in dialog program, this notes tab has all formatting icons to enable create/upload/modify the text entered and passed to SAP standard text objects.
    Edited by: sharmalvn on Jun 29, 2009 4:34 PM

    Take a look at function modules:
    - SAVE_TEXT (saves text to an existing object)
    - READ_TEXT (read text from an existing object)
    - CREATE_TEXT (writes text to a new object)
    Hope that helps,
    Michael

  • I have to wait longer for my iPhone 6?!?!

    I pre ordered the iPhone 6 and when i got the confirmation an hour later, the delivery date said 9/19. I go to the verizon website and it says delivery by 10/14. Does that mean that i have to wait longer for my iPhone 6? I hope that it means for the people that order it now have to wait..

    Exact same issue here and I ordered mine before the midnight preordering started. It said it would be delivered by 9/19, then when I checked the status it said 10/14. Now it say expected ship date not available. I don't think anyone knows when it will ship at this point. I called customer support and got a bunch of vague answers and still no real date to expect my phone. You would think by this point that they could look up how many phones they will have, who ordered first, and assign shipping dates. I remember a similar issue with the iphone 5 launch that ended up working itself out and my phone arrived on launch day. Hopefully this will work out the same.

  • Calculate how long a function takes to run

    I would like to know how to find out how long the function will take to run
    public int[][] MatrixMultiplication(int[][] MatrixA, boolean[][] MatrixB) {
            int result[][] = new int[number_positions + 2][number_positions + 2];
            int temp = 0;
            for (int j = 0; j < number_positions + 2; j++) {
                for (int i = 0; i < number_positions + 2; i++) {
                    for (int k = 0; k < number_positions + 2; k++) {
                        temp = (MatrixB[j][k])? 1 : 0; 
                        //result[i][k] += MatrixA[i][j] * MatrixB[j][k];
                        result[i][k] += MatrixA[i][j] * temp;
            return result;
        }

    gamewell wrote:
    I would like to know how to find out how long the function will take to runNote that you need to repeat the multiplication N times and clock that. Select N so the total time is at least 1 second. Then you divide the total time with N to get the average time per call.
    public int[][] MatrixMultiplication(int[][] MatrixA, boolean[][] MatrixB) {
    int result[][] = new int[number_positions + 2][number_positions + 2];
    int temp = 0;
    for (int j = 0; j < number_positions + 2; j++) {
    for (int i = 0; i < number_positions + 2; i++) {
    for (int k = 0; k < number_positions + 2; k++) {
    temp = (MatrixB[j][k])? 1 : 0; 
    //result[i][k] += MatrixA[i][j] * MatrixB[j][k];
    result[i][k] += MatrixA[i][j] * temp;
    return result;
    }If you care about efficiency you should remove invariants from the innermost loop. As you can see i and j don't change and because array accesses are expensive they should be removed. Also why perform the multiplication with 0 when you know it will have no effect? It's better to avoid that case.
    // innermost loop
    boolean[] mb = MatrixB[j];
    int[] res = result;
    int m = MatrixA[i][j];
    for (int k = 0; k < number_positions + 2; k++) {
    if (mb[k])
    res[k] += m;
    Now everything that's constant has been removed and only what depends on k is left. With very few iterations in the innermost loop this may not pay off but it's worth a try.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Need Advice on TimeOut Functions

    I have a project that needs to run a video when the user becomes idle (no mouse movements or keyboard presses) for a specified period of time.
    Here is the script I have
    on timeout
         get the timeoutLength to 2 * 10800
         go to the frame "0" of movie "Loop"
    end timeout
    but this seems like it isn't working. Is there any changes in Director 11.5 that may be a reason why this isnt working?
    Thanks

    I don't think it's anything specific to 11.5 that might be causing you problems, but rather your script.
    First off you start with "get the ..." which shouldn't even compile much less run. I suspect you were trying to define the length of time before your movie will fire off the #timeout event to movie scripts. You need to do this in a initialisation handler, like #prepareMovie. Your next line of code has problems too: go to the frame "0" of movie "Loop" - 'the frame' is shorthand for 'whatever frame the movie is currently on' and so this won't take you to the expected frame. You then say 'frame "0"' - do you have a frame labelled "0" or were you expecting to be taken to the first frame in the movie file? So you need to drop the 'the' and either use a raw integer for the frame number or a valid string for a labelled frame - and I will assume movie "Loop" is a completely separate and distinct file from the one currently playing, otherwise you don't need it at all.
    -- movie script:
    on prepareMovie
      the timeoutLength = 360 * 60 -- == 6 minutes
    end
    on timeout
      go to frame "attract" -- of movie "Loop"
    end
    I would suggest lowering the timeoutLength to something sensible while you test this - perhaps 300 (5 seconds) should be enough to show you whether it's working like you expect/intend.
    However, I'm not sure that any of these in-built timeout functions monitor mouse movement, but rather clicks. You may have to create a monitor yourself that implements this if testing reveals it doesn't perform like you need it to. You might have better luck with the 'lastRoll' and 'lastEvent' Player properties.
    -- movie script:
    on enterFrame
      if ( _player.lastEvent > (360 * 60) ) then
        _movie.go("attract")
      end if
    end

  • HT1689 When is IOS 7 going to be ready for downloads?  I am in India - will I be able to download the moment it is released or will i need to wait longer?

    When is IOS 7 going to be ready for downloads?  I am in India - will I be able to download the moment it is released or will i need to wait longer?

    vijaygopal141 wrote:
    When is IOS 7 going to be ready for downloads?  ...
    iOS 7 is due for General Release in the Fall (Sept- Dec) 2013.
    See the very end of this link for Compatible Devices and Features...
    http://www.apple.com/ios/ios7/features/

  • When will CC Sync be working, having we waited long enough?

    When will CC Sync be working, having we waited long enough?

    creative.adobe.com appears to be an alias for something in Amazon’s Web Services cloud.  Ping is a useful tool to see what actual Amazon server the creative.adobe.com is using.
    Here is what I do on my Windows computer:
    Start / All Programs / Accessories / Command Prompt  OR you can just type cmd in the Run area in the Start menu.
    A black window with white text should open, and at the C:\> prompt type:
    C:\> ping creative.adobe.com (enter-key)
    On my computer I see the following:
    C:\>ping creative.adobe.com
    Pinging production-us-1147131027.us-east-1.elb.amazonaws.com 23.23.208.194 with 32 bytes of data:
    Request timed out.
    Request timed out.
    Request timed out.
    Request timed out.
    Ping statistics for 23.23.208.194:
        Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
    The important thing is the name and the IP-address on the very first Pinging-whatever line.  The timed-out and 100% loss are expected because the servers are behind a firewall that doesn’t allow pinging, but keep track of what different IP-addresses are shown.  I have done this several times in a row and one time I got 54.255.242.223 for the IP address while the other 5 times I got what you see, above: 23.23.208.194.
    What you want to do is whenever it does actually work in IE or FF, quickly go to a command-prompt and do a ping creative.adobe.com and write down the ip-address—the four numbers with periods between.
    Then you can use notepad to edit your hosts file in c:\windows\system32\drivers\etc and add a line at the bottom that looks like:
    xxx.xxx.xxx.xxx creative.adobe.com
    where xxx.xxx.xxx.xxx is the set of four numbers you saw when it worked.
    Save the hosts file and see if it still continues to work.  If not then edit the hosts file, again, and put a # (pound) sign in front of the line—which disabled that mapping, but you’ll know you’ve tried it and it didn’t work, like so:
    #xxx.xxx.xxx.xxx creative.adobe.com
    What the line in the hosts file without # will do is tell your computer to always use the particular IP address when it goes to creative.adobe.com
    If at some point after you've done thing creative.adobe.com stops working, again, then edit your hosts file and add a # in front of the one line with creative.adobe.com that doesn't have it to disable the ip address mapping and see if things work ok without it.  The issue seems like an internet problem or internet-security-on-your-computer problem not specifically an Adobe problem.
    What part of the world are you trying to access creative.adobe.com from?

  • Timeout Functionality needed...

    I have a method called myMethod(). I want to write a java program so that I can interrupt this method when we have a timout.
    I tried writing following method. Please let me know what is wrond in this:
    import java.io.*;
    class Example5 extends Thread {
         public static void main( String args[] ) throws Exception {
         Example5 thread = new Example5();
         System.out.println( "Starting thread..." );
         thread.start();
         public void run() {
              long startTime = System.currentTimeMillis();
              Thread thisThread = Thread.currentThread();
              long timeout = 10;
              long finishTime = startTime + 1;
              System.out.println("@@@@@@@@@@@@@ Start time is @@@@@@@" + startTime + "###### finish time is " + finishTime);
              if(System.currentTimeMillis() >= finishTime){
                   Thread.currentThread().interrupt();
              else{
                   try {
                        myMethod(finishTime);
                   } catch ( Exception e ) {
                        System.out.println( "Could not create the socket..." );
         public void myMethod(long finishTime){
              while(System.currentTimeMillis() <= finishTime){
                   long total = 0;
                   for (int i = 0; i < 100; i++) {
                   total += i;
                        System.out.println("################ doVerbFor Called###############" +i);
    }

    Use code tags when you post a code.
    /* thread timeout example */
    import java.util.*;
    class Example5 extends Thread {
      static boolean done = false;
      long period = 100; // 0.1 second
      public static void main( String args[] ) throws Exception {
        Example5 thread = new Example5();
        TimerTask tt = new TimerTask(){
          public void run(){
            done = true;
        Timer tm = new Timer(true);
        System.out.println( "Starting thread..." );
        thread.start();
        tm.schedule(tt, thread.period);
      public void run(){
        int total = 0;
        while (! done){
          System.out.println("@@@@@@");
          myMethod(++total);
      public void myMethod(int arg){
        System.out.println("### myMethod running ### " + arg);
    }

  • AME is not crashing....just wait longer.

    Just found out...by accident. AME takes a real lot
    of time to load a sequence. About 12 minutes for
    the project I did today. (I dont have the fastest machine,
    but its not a complicated edit )
    If you think its frozen, just wait longer. Dont get nervous.
    If you click on anything it will crash.

    How many clips are in the project panel? I wonder if AME has similar speed issues to PPro when opening a project with a lot of source files.
    Cheers
    Eddie
    PremiereProPedia   (
    RSS feed)
    - Over 300 frequently answered questions
    - Over 250 free tutorials
    - Maintained by editors like
    you
    Forum FAQ

  • Handling long timeouts

    I'm using a PCIe-1429 with a custom camera.  The camera can generate frames at arbitrary times.  To capture images, I set a long timeout value, and then start a ring buffer with imgRingSetup (C program, Windows XP).  If I want to stop the capture, I do:
    imgSessionAbort(*Sid, NULL);
    imgClose(*Sid, TRUE);
    imgClose(*Iid, TRUE);
    If no frames are arriving, this code hangs until a timeout has occurred.  Ideally, I'd like an infinite timeout, and closing the session to happen immediately.  The imgSessionAbort documentation claims that the acquisition will be stopped immediately, but this appears to be false.  Are there any known solutions to this problem?
    Thanks!
    -Greg

    The imgClose(*Iid, TRUE); is the call that blocks.  I have tried using imgSessionStopAcquisition - then it is the call that blocks.
    I agree that it's strange behavior - perhaps off the shelf cameras are always sending frames, but some cameras (astronomy, for instance) might only emit one frame an hour.  I hope a good solution exists for this scenario.  Alternatively, if nobody else sees this behavior, then I need to figure out what I'm doing differently/wrong.  I have seen this same behavior across several different NI capture cards, OS's, and cameras.

Maybe you are looking for