c++builder - Is TControlList::Invalidate() thread safe? - Stack Overflow

If I call MainForm->ControlList1->Invalidate() from a TIdUDPServer::>OnUDPRead event, is it th

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()?

Share edited Mar 3 at 22:48 Remy Lebeau 601k36 gold badges508 silver badges851 bronze badges asked Mar 3 at 22:43 JKofskyJKofsky 1438 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

The 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

相关推荐

  • c++builder - Is TControlList::Invalidate() thread safe? - Stack Overflow

    If I call MainForm->ControlList1->Invalidate() from a TIdUDPServer::>OnUDPRead event, is it th

    18小时前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信