Search Results

Search found 4335 results on 174 pages for 'wait'.

Page 63/174 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • Fork two processes and kill the second when the first is done

    - by User1
    The title says it all. I want to create a bash script that will launch two processes and kill the second process when the first is done. Here's an example: #fork first process producer& #fork second process consumer& #wait for producer to finish ... #kill the consumer ... I have a feeling this can get ugly but has a very simple solution. Please help me fill in the blanks.

    Read the article

  • specifying ThreadPoolExecutor problem

    - by Sarmun
    Is there any way to create Executor that will have always at least 5 threads, and maximum of 20 threads, and unbounded queue for tasks (meaning no task is rejected) I tried new ThreadPoolExecutor(5, 20, 60L, TimeUnit.SECONDS, queue) with all possibilities that I thought of for queue: new LinkedBlockingQueue() // never runs more than 5 threads new LinkedBlockingQueue(1000000) // runs more than 5 threads, only when there is more than 1000000 tasks waiting new ArrayBlockingQueue(1000000) // runs more than 5 threads, only when there is more than 1000000 tasks waiting new SynchronousQueue() // no tasks can wait, after 20, they are rejected and none worked as wanted.

    Read the article

  • I am loading content via Ajax, but I need it to not load anything when my site loads

    - by Reden
    I'm loading content into several divs with ajax_loadContent <div class="content"><div class="container" id="contents2"><!-- Empty div for dynamic content -->Loading content. please wait...</div><script type="text/javascript">ajax_loadContent('contents2','http://www.thewebsite.com/blank.php');</script></div> Basically, I don't want to load anything until the user clicks on the links I have specified to load content into these instances, please help! Right now, I'm loading a blank file to show nothing in the div.

    Read the article

  • how to watch input buttons with specified name?

    - by user393087
    For example I have long list of buttons: <input type=button name=clickbutton onclick='dosomething(this)'> But instead of putting call to the same funcion in every button it would be more rational to add a single listening event that would wait for click of that button with this name. But again, there are maany this buttons so I need pass clicked object to a function. For example this function must update a textarea field that is adjacent (nextSibling) to this button.

    Read the article

  • Waiting for a subset of threads in a Java ThreadPool

    - by David Semeria
    Let's say I have a thread pool containing X items, and a given task employs Y of these items (where Y is much smaller than X). I want to wait for all of the threads of a given task (Y items) to finish, not the entire thread pool. If the thread pool's execute() method returned a reference to the employed thread I could simply join() to each of these Y threads, but it doesn't. Does anyone know of an elegant way to accomplish this? Thanks.

    Read the article

  • ASP.NET MVC 2 A question about an Asynchronous Controller

    - by Tony
    Hi, I'm wondering about one thing - let's assume that the user clicks a button, and the asynch controller's action is invoked. What happens, when the asynchronous action takes e.g. 10 seconds? The user has to wait 10 seconds to view the result of the action? If so, are the asynch controllers really helpful ?

    Read the article

  • Can an Ajax call complete before the DOM is loaded?

    - by Ek0nomik
    I am grabbing data through a jQuery Ajax call, and displaying it on the page. I need to wait for both the DOM to load and for the Ajax call to complete before I can use the data to display it on the page. Can an Ajax call ever complete before the DOM has loaded? I'm just trying to determine where I need to put my method that will manipulate the DOM and use the data I'm getting back.

    Read the article

  • Force ClickOnce - application to be started offline?

    - by stormianrootsolver
    I have a click once application here that needs to be started offline exclusively sometimes. Reason is that it needs to be started VERY early during boot, at a point when there is no network connection yet, also it must not wait for any network connectivity. I know, this requirement seems strange, but it has legacy reasons. What do you think?

    Read the article

  • Linux signals with extra information parameter

    - by Tester
    I was to have some extra information in the callback to sa_sigaction handler, it does not seems possible. So I was wondering if you could suggest me alternatives. Basic requirements: Function A raises an signal/event with a pointer to a struct Handler function tackles the event. The handler function would only be called on an event and a loop to wait for the event, as in select() , is undesirable. TIA

    Read the article

  • Quicktime logo! Can it be hidden / disabled?

    - by decbrad
    Hi there, just wondering if it is possible to hide/disable the quicktime logo when displaying .MOV video on my site? Because the size of the video is large (3MB), I have included a rotating loading animation, however once the video player loads, the Quicktime logo hides the animation, which makes the user less likely in my opinion to wait for the movie to load? Any advice would be great! Cheers! Decbrad

    Read the article

  • Cooler ASCII Spinners?

    - by Jason
    In a console app, an ascii spinner can be used, like the GUI wait cursor, to indicate that work is being done. A common spinner cycles through these 4 characters: '|', '/', '-', '\' What are some other cyclical animation sequences to spice up a console application?

    Read the article

  • Android setContentView operation

    - by stormin986
    I've read that it's important to call setContentView() early in an activity since it builds the view objects that may be manipulated by subsequent code in onCreate(). In terms of lifecycle, does the view get drawn to screen as soon as setContentView() is called, or does it allow the onCreate() function to build/populate the information in the view objects, and wait to actually draw it after onCreate() completes? Thanks!

    Read the article

  • Editing code in Visual Studio 2008 in debug mode

    - by user279521
    I am curious to know if there is a way to edit code in VS 2008 right when it has hit a breakpoint and I am walking thru the code... can I modify the code (such as the value in a variable or if my stepthrough line is about to hit an if statement ... can I modify the if statement....etc)? So far, I have to stop running VS, modify the code, then hit F5 and wait till the breakpoint is hit again.

    Read the article

  • Toggling between states on 3 containers in jQuery

    - by Saif Bechan
    Hello, i have an php/mysql/ajax auction application application. Now there is a section that can have 3 states. State one, the user can place a bid.(Bid button is shown) State two, the user has to wait before he can place a new bid(number of sec is shown) State three, the user has an auto bidding system enabled.(The price maximum and amount ate shown). Now i get these values trough jquery ajax, and i want to present the user the right section. Now the code i have is as follows: if(data[i].bidwait >= 0 && data[i].amount == ''){ // In this section the user has no autobiddings, and can place a bidding $(productContainer+' .bid-wrapper').removeClass('none'); $(productContainer+' .bidwait-wrapper').addClass('none'); $(productContainer+' .autobid-wrapper').addClass('none'); }else if(data[i].bidwait < 0 && data[i].amount == ''){ // In this section the user has to wait the amount of sec to place a new bid $(productContainer+' .bid-wrapper').addClass('none'); $(productContainer+' .bidwait-wrapper').removeClass('none'); $(productContainer+' .autobid-wrapper').addClass('none'); $(productContainer+' .bidwait-text').text(data[i].bidwait * -1); }else{ // In the last section the user has the auto bidder enabled, so that is shown $(productContainer+' .bid-wrapper').addClass('none'); $(productContainer+' .bidwait-wrapper').addClass('none'); $(productContainer+' .autobid-wrapper').removeClass('none'); $(productContainer+' .amount').html(data[i].amount == 0 ? '&#8734;' : data[i].amount); $(productContainer+' .maxprice').html(data[i].maxprice == 0 ? '&#8734;' : data[i].maxprice); } This looks like an awful lot of code for something so small. I was wondering if there is an easier method to accomplish such a thing. Speed is a huge issue for me because this has to run every second in the users browser. If there is no other option i am just going to remove this option and go with a no ajax approuch. If you have been, thank you for reading!

    Read the article

  • Stopping a service and waiting in VBScript

    - by BrettS
    How can I stop a service and wait for it to finish stopping in vbscript? I've got this so far: For Each objService in colServiceList If objService.DisplayName = "<my display name>" Then objService.StopService() End If Next Googling turned up a suggestion of using objService.WaitForStatus( ServiceControllerStatus.Stopped ), but running that gives me an error of "Object required: 'ServiceControllerStatus'".

    Read the article

  • Ruby multiple background threads

    - by turri
    I need to run multiple background threads in a thread pool with timeout. The scheme is something like: #!/usr/bin/env ruby require 'thread' def foo(&block) bar(block) end def bar(block) Thread.abort_on_exception=true @main = Thread.new { block.call } end foo { sleep 1 puts 'test' } Why if i run that i get no output? (and no sleep wait?)

    Read the article

  • Better alternative for PipedReader/PipedWriter?

    - by Esko Luontola
    I need to have a buffered char stream, into which I write in one thread and from which I read in another thread. Right now I'm using PipedReader and PipedWriter for it, but those classes cause a performance problem: PipedReader does a wait(1000) when its internal buffer is empty, which causes my application to lag visibly. Would there be some library which does the same thing as PipedReader/PipedWriter, but with better performance? Or will I have to implement my own wheels?

    Read the article

  • how to cancel an awaiting task c#

    - by user1748906
    I am trying to cancel a task awaiting for network IO using CancellationTokenSource, but I have to wait until TcpClient connects: try { while (true) { token.Token.ThrowIfCancellationRequested(); Thread.Sleep(int.MaxValue); //simulating a TcpListener waiting for request } } any ideas ? Secondly, is it OK to start each client in a separate task ?

    Read the article

  • Multithreaded Applications

    - by j-t-s
    Hi All I have been reading the articles on MSDN, but my mind is dead (this usually happens when I read MSDN (No offense MSDN, but your articles confuse me at times.)), and I'm trying to do some "background work" in may app, but not sure how. It's just a single method. But the application hangs, and I have to wait up to 1 - 3 minutes for it to become ...unhanged? Are there any simple examples that are laying 'roun online somewhere that I can have a look at/play around with? Thank you all

    Read the article

  • netServiceBrowserDidStopSearch not called

    - by user263569
    I'm now writing a Bonjour service listener class, according to the document here: Currently, it seems working, I can receive "netServiceBrowserWillSearch:" and "didFindService:moreComing:" correctly. However, after a long wait, I cannot receive " netServiceBrowserDidStopSearch:" or "netServiceBrowser:didNotSearch:". Therefore I don't know that is the proper time for my delegate class to stop showing some UI. Could anyone have an idea for this? Thanks.

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >