Thread Timing? - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: Qbasic "like" compilers/interpreters (http://qbasicnews.com/newforum/forum-5.html) +--- Forum: FB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-15.html) +--- Thread: Thread Timing? (/thread-8172.html) |
Thread Timing? - SSC - 10-01-2005 I am messing around with threading for something I am working on, and it works except the ouput is slightly garbled. Also depending on what delay I give the teletyping I get different results, all of which are garbled by at least 1 character. For the teletyping, the 2nd and 3rd lines are the threads and the 1st and 4th are regular called routines. Here are the different results I get and the code that I used: This is what I get when running with Sleep 25 This is what I get when running with Sleep 100 This is what I get when running with Sleep 250 And here is the code: Code: declare sub thread1(byval num as integer) Thread Timing? - wallace - 10-04-2005 Looks to be a glitch in FreeBasic. Maybe it only has one position variable, the one that tells it where it is on the screen. Where are you putting the SLEEP statement? Thread Timing? - rdc - 10-04-2005 I believe you have to use mutexes for this type of operation. There is a thread about this on the Freebasic forum: http://www.freebasic.net/forum/viewtopic.php?t=1418 |