two threads how to ???

U

Une bévue

i do have two threads :

@isConnected=false

connect_thread=Thread.new {
@isConnected=true
connectToNewsServer
@isConnected=false
}

test_thread=Thread.new {
[email protected]_s + " => "
sleep 0.1
blabla+=@isConnected
}

connect_thread.join
test_thread.join

p blabla


and i get allways :

true => false even if the time for "connectToNewsServer" is much larger
than the sleep time (0.1 s)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,208
Messages
2,571,079
Members
47,682
Latest member
TrudiConna

Latest Threads

Top