SlashOwnsU
New member
- Joined
- Jul 24, 2006
- Messages
- 2
- Programming Experience
- Beginner
hello...
I just started experimenting with threads and sockets on dot net, and was quite happy with it until something unexpected happened
I have something resembling this
somewhere else I create a PConn object and pass it to a player
when a player tries to operate on the pconn object, the thread is stopped
any ideas ? is it normal ?
I just started experimenting with threads and sockets on dot net, and was quite happy with it until something unexpected happened
I have something resembling this
VB.NET:
public class PConn
public sub run()
do while(true)
...some irrelevant operations
loop
end sub
public sub doSomething()
(empty)
end sub
end class
when a player tries to operate on the pconn object, the thread is stopped
VB.NET:
...
dim pconn as new PConn
dim th as new Thread(AddressOf pconn.run)
th.start
dim p as new Player(pconn)
...
'in class player, somewhere...from this point, the running thread in
'class PConn stops, even if doSomething() is an empty method
pconn.doSomething()
any ideas ? is it normal ?