- This topic has 2 replies, 2 voices, and was last updated 4 years, 5 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
Home › Forums › kbmMW › Are components TkbmClientQuery,TkbmMWClientConnectionPool,TkbmClient threadsafe?
Hello
I have application with TkbmMWClientQuery,TkbmMWClientConnectionPool,TkbmClient on datamodule. I create thread with TkbmMWClientQuery with properties ConnectionPool and StreamFormat linked to components on datamodule. After this I catch error on main thread in TkbmMWCustomPooledDataSet.SetActive(Value:boolean). I run Server in Delphi debuger but don’t see error on serverside.
How do I properly use TkbmMWClientQuery in separated thread?
Thanks
Vadim Mescheryakov
Hello
I created new TkbmMWClientQuery,TkbmMWClientConnectionPool,TkbmClient, TkbmMWPooledSession objects, I obtaned a new token for a new client object and now it works. Is it right solution?
Thanks
Vadim Mescheryakov
Hi,
TkbmMWClientQuery and TkbmMWClient should be instantiated in each thread.
TkbmMWClientConnectionPool and optionally TkbmMWPooledSession is often placed in a shared place and are thus threadsafe.
/Kim