G
Guest
hi,
I just created a class, that sometimes needs to contact a webservice on the
internet. Now, as the network connection of the local computer isn't always
available, I need this call to be asynchronous, in a way that it doesn't
block the whole program.
That's why I tried to implement some sort of multithreading: the function
that needs to be called asynchronously needs some strings as arguments, but I
cannot find a way to pass arguments to my thread routine....
Second, I have a question concerning the life cycle of thread objects: When
I create a thread object in a sub (by 'new'), start a thread and immediately
quit the sub - is the thread I started still executing - or killed?
By the way, I thought of implementing the whole stuff by a timer (that is
called after 10 ms) - if that gives me the opportunity to avoid the use of
'real' threads - or makes paramter handling easier....is this a good idea?
Thanks,
Peter
I just created a class, that sometimes needs to contact a webservice on the
internet. Now, as the network connection of the local computer isn't always
available, I need this call to be asynchronous, in a way that it doesn't
block the whole program.
That's why I tried to implement some sort of multithreading: the function
that needs to be called asynchronously needs some strings as arguments, but I
cannot find a way to pass arguments to my thread routine....
Second, I have a question concerning the life cycle of thread objects: When
I create a thread object in a sub (by 'new'), start a thread and immediately
quit the sub - is the thread I started still executing - or killed?
By the way, I thought of implementing the whole stuff by a timer (that is
called after 10 ms) - if that gives me the opportunity to avoid the use of
'real' threads - or makes paramter handling easier....is this a good idea?
Thanks,
Peter