If I call MainForm->ControlList1->Invalidate()
from a TIdUDPServer::>OnUDPRead
event, is it thread safe, or do I still need to use TThread::Synchronize()
or TThread::Queue()
?
If I call MainForm->ControlList1->Invalidate()
from a TIdUDPServer::>OnUDPRead
event, is it thread safe, or do I still need to use TThread::Synchronize()
or TThread::Queue()
?
1 Answer
Reset to default 1The TIdUDPServer::OnUDPRead
event is synchronized by default, so any code you put inside of that event handler will be thread-safe as far as UI access is concerned.
You can disable that synchronization by setting the TIdUDPServer::ThreadedEvent
property to true
.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745068807a4609419.html
评论列表(0条)