Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • I have used decorator syntax before but would not recommend it in this case. Commented Feb 12, 2010 at 17:58
  • @NoctisSkytower why would you not recommend a decorator in this case? What do you feel is the disadvantage or risk? Commented Oct 28, 2013 at 19:19
  • @tristan: Most decorated code involves methods in classes. Based on how multiprocessing works in this example, any changes that happen in the decorated code would not be reflected in the original object. All changes stay in the second process the add_timeout function ends up creating. Commented Oct 29, 2013 at 0:38