>> friday afternoon I outlined my new approach.
>> Before implementing it I'd like to know if packing all creating and closing
>> stuff in a dedicated thread (one for all sockets) with a message pump
>> is okay (should work if implemented with some care).
> 
> Yes, it is OK. BUT make sure your code is executed in the thread's context. 
> It is the execution
> context which is important, not where the code is. As I already said 3 times, 
> you may have a TThread
> method which is executed by the main thread (or any other), or have a method 
> of some TForm executed
> in the context of a worker thread.
> 
>> Did I understand the concept correctly now?
> 
> I don't know if you distinguish the class TThread and the "execution context" 
> of a thread.

Yes I do now. All things called byt the execute method of the thread are
within its contect, all others are not,
even if they are a method of the TThread descendant.

I want to make is in such a way, that all create/close requests are
fired by calling methods of my TThread descendant
but do only signal the execute method that there is something to do and
the parameters needed.
The execute method will stop message processing for a short period then
for starting that action and return to processing messages again. The
only thing I'm yet unsure is the message processing part, but: another
day another idea or so the saying goes... ;-)

Greetings

Markus
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to