Hi,

for my app I needed a small engine that constantly resort some data as new one is available. I made everything in a thread and it's really working great, but there's something that surprises me.

The thread is quite simple:
In the run a queue of data is processes. If the queue of data (an array) is empty then the thread is suspended. To add new data I implemented a add() method that prepares and appends, when necessary, data to the queue. If the thread is suspended it starts it again.

What surprises me is that if the thread is running (still processing data) I can still call .add() without having to wait for the run() to end. It is as if the add method would be threaded as well. (a thread in a thread?).

This is suppose to be normal I guess. But are there limits? Are all method *threaded*?

Thanks,
Tomas

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to