A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-December/030666.html below:

[Python-Dev] Can someone look at dummy_thread (#622537)?

[Python-Dev] Can someone look at dummy_thread (#622537)? [Python-Dev] Can someone look at dummy_thread (#622537)?Guido van Rossum guido@python.org
Tue, 03 Dec 2002 07:07:53 -0500
> > >     try:
> > >         import threading
> > >     except ImportError:
> > >         threading = None # use non-threaded behaviour
> > 
> > But then you'd have to sprinkle the rest of the code with
> > "if threading is not None" tests.  Brett's dummy_thread is an attempt
> > to reduce this clutter.
> 
> the problem (if there is one) is that the proposed integration may
> break code that uses the above pattern.

I don't propose to automate this.  I propose this:

  try:
    import threading
  except ImportError:
    import dummy_threading as threading

> deadlocks doesn't always happen when you want them to, so it
> may not be obvious to developers and testers that their program
> isn't as reliable as it was before the upgrade.

So require testing on a system that has threads.

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4