jorge Posted September 6, 2003 Posted September 6, 2003 (edited) thread? help? Ok, i have some code that wait for a connection, But i'd like to do other stuff, at the same time, So i thing thread will help me there, tell me if i'm wrong. And thread would also make it posible to pause the funtion? and restart later? and if it is the bets way, how do i creat, stop and start a thread? Thanx in advance Edited September 6, 2003 by jorge Quote Jorge - http://www.blackdot.be/?page=apache.htm
aewarnick Posted September 6, 2003 Posted September 6, 2003 That is the kind of question you can look up on the net. Quote C#
*Experts* Volte Posted September 6, 2003 *Experts* Posted September 6, 2003 Look in the MSDN for System.Threading namespace. Here's a short example:Private Sub SecondarySub() 'do the stuff you want to do while waiting End Sub Private Sub Form_Load(sender As Object, e As System.EventArgs) Handles MyBase.Load Dim t As New Threading.Thread(AddressOf SecondarySub) t.Start() 'wait for connection here... End Sub Quote
jorge Posted September 7, 2003 Author Posted September 7, 2003 ok, got it to work, but one problem... I made a thread for the server, but i want to kill the tread when it's not needed anymore, how? don't seen thread.stop() :( Quote Jorge - http://www.blackdot.be/?page=apache.htm
jorge Posted September 7, 2003 Author Posted September 7, 2003 ok this is what i have(see attachemnt) but it won't stop :s :(server.vb Quote Jorge - http://www.blackdot.be/?page=apache.htm
jorge Posted September 9, 2003 Author Posted September 9, 2003 anyone? Quote Jorge - http://www.blackdot.be/?page=apache.htm
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.