Naming conventions for threads?

前端 未结 7 1886
南笙
南笙 2020-12-24 06:16

It\'s helpful to name threads so one can sort out which threads are doing what for diagnostic and debugging purposes.

Is there a particular naming convention for thr

相关标签:
7条回答
  • 2020-12-24 07:07

    I tend to approach naming threads the same as naming methods or variables. Pick something that concisely describes the process that the thread is responsible for. I don't think there's a lot of extra information that you can or should put into a thread-name. Expressive but terse is the primary goal.

    The only convention might be to add an incremented suffix to threads that are part of a pool.

    0 讨论(0)
提交回复
热议问题