Author stefan.richthofer
Recipients nickmbailey, stefan.richthofer, zyasoft
Date 2016-02-02.05:28:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This can likely be fixed by adjusting org.python.modules._io.Closer a bit (see our discussion at

AtomicBoolean dismissed = new AtomicBoolean();

public void dismiss() {
  if (dismissed.compareAndSet(false, true))

public synchronized Void call() {
  if (dismissed.compareAndSet(false, true)) {

Note that dismiss does not need to be synchronized any more, still maintaining the old behavior. If Nick can confirm that this solves the issue, we can maybe get it already into beta 3 right now.
Later we should add a note to documentation of PySystemState.registerCloser and related API that Callable-implementors must not introduce their own locks because of deadlock risk. They rather should lock on PySystemStateCloser.class or use non-blocking locks like this AtomicBoolean variant. However I'd add this doc-stuff later for the RC.
Date User Action Args
2016-02-02 05:28:28stefan.richthofersetmessageid: <>
2016-02-02 05:28:28stefan.richthofersetrecipients: + stefan.richthofer, zyasoft, nickmbailey
2016-02-02 05:28:28stefan.richthoferlinkissue2457 messages
2016-02-02 05:28:28stefan.richthofercreate