New topic: Timers and events in the same thread
<http://forums.realsoftware.com/viewtopic.php?t=47423> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message Don76 Post subject: Timers and events in the same threadPosted: Wed Mar 27, 2013 5:09 pm Joined: Thu May 03, 2012 3:21 pm Posts: 5 Location: Switzerland Hi, I have 3 UDP sockets and 2 timers in the same form. Are the events from UDP socket and the 2 timers managed in the same thread (form)? Do I need to use "semaphore"? Note: timers and UDP events change the same global variable. Best regards Sacha Top timhare Post subject: Re: Timers and events in the same threadPosted: Wed Mar 27, 2013 5:50 pm Joined: Fri Jan 06, 2006 3:21 pm Posts: 12183 Location: Portland, OR USA The events are all processed by the main thread, during the event loop. They will not overlap (are not preemptive), so you can be confident that the code in each event will complete before the next event fires (unless you are using DoEvents somewhere, then all bets are off). You do not need a semaphore in this scenario. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
