search

Home  >  Q&A  >  body text

关于python的线程同步锁的获取

PHPzPHPz2892 days ago370

reply all(1)I'll reply

  • 阿神

    阿神2017-04-18 09:34:13

    Synchronization means "waiting", and locks are the technology to realize "waiting".
    The meaning of threads is that it is best to only do one thing. If it must "wait" for other threads in the process of doing something, then " Waiting", skipping is meaningless.
    If you are afraid of "waiting" for a long time, you can use another daemon thread to regularly check the status of the worker thread.

    reply
    0
  • Cancelreply