aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen/wx_extra
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2011-12-02 16:26:45 +0100
committerDan Gudmundsson <[email protected]>2011-12-06 10:13:49 +0100
commit8b6f6db0f5faddc970a7867aecdb03f3cde5fa78 (patch)
tree9a1798efd7150d9f416d2d32180dc4be5cac3732 /lib/wx/api_gen/wx_extra
parent50b488753358d38348f2d4051bfcea8d860e739b (diff)
downloadotp-8b6f6db0f5faddc970a7867aecdb03f3cde5fa78.tar.gz
otp-8b6f6db0f5faddc970a7867aecdb03f3cde5fa78.tar.bz2
otp-8b6f6db0f5faddc970a7867aecdb03f3cde5fa78.zip
[wx] Avoid deadlock in handle_sync_event
Avoid sending cb messages to the wx_object, since it may deadlock. Instead send it to the wxe_server which reads the state from the wx_object's process_dictionary. Ugly but it's the only way I can avoid the deadlock.
Diffstat (limited to 'lib/wx/api_gen/wx_extra')
-rw-r--r--lib/wx/api_gen/wx_extra/wxEvtHandler.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/wx/api_gen/wx_extra/wxEvtHandler.erl b/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
index c6810eb32c..080ebfa49f 100644
--- a/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
+++ b/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
@@ -76,7 +76,7 @@ parse_opts([{callback,Fun}|R], Opts) when is_function(Fun) ->
%% Check Fun Arity?
parse_opts(R, Opts#evh{cb=Fun});
parse_opts([callback|R], Opts) ->
- parse_opts(R, Opts#evh{cb=1});
+ parse_opts(R, Opts#evh{cb=self()});
parse_opts([{userData, UserData}|R],Opts) ->
parse_opts(R, Opts#evh{userdata=UserData});
parse_opts([{skip, Skip}|R],Opts) when is_boolean(Skip) ->