From Overbyte
Jump to: navigation, search

Main page -> ICS component reference -> TWSocket -> MultiThreaded


property MultiThreaded: Boolean;


MultiThreaded tells TWSocket that it is used within a secondary thread. You must set the MultiThreaded property to true whenever you use TWSocket outside of the main thread. A common mistake is to think MultiThreaded set to true means the component will be multithreaded. This is wrong! It doesn't tell the component to create threads, it tells the component that it is running in a secondary thread.

If you forget to set MultiThreaded to true and your TWSocket is running in a secondary thread, then you'll have some trouble with message handling. The problem is not obvious, but you'll have troubles!


Best practices

How to