aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2015-07-07 10:38:38 +0200
committerDan Gudmundsson <[email protected]>2015-07-07 10:38:38 +0200
commitfcbc24440945a13b379b2b6135599c982bf8bdf0 (patch)
tree5c04db3494dfe5c196ab291da7bb2dcddadcf101 /lib/wx/api_gen
parent70cb9432dc03ac9435b2c8c5fe2e8fd0608015dc (diff)
downloadotp-fcbc24440945a13b379b2b6135599c982bf8bdf0.tar.gz
otp-fcbc24440945a13b379b2b6135599c982bf8bdf0.tar.bz2
otp-fcbc24440945a13b379b2b6135599c982bf8bdf0.zip
wx: Add event callback fastpath
Avoids spawn but can deadlock
Diffstat (limited to 'lib/wx/api_gen')
-rw-r--r--lib/wx/api_gen/wx_extra/wxEvtHandler.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/wx/api_gen/wx_extra/wxEvtHandler.erl b/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
index c9726fd475..85ebc093f5 100644
--- a/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
+++ b/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
@@ -70,6 +70,8 @@ connect(This=#wx_ref{type=ThisT}, EventType, Options) ->
parse_opts([{callback,Fun}|R], Opts) when is_function(Fun) ->
%% Check Fun Arity?
parse_opts(R, Opts#evh{cb=Fun});
+parse_opts([{callback,CB={nospawn, Fun}}|R], Opts) when is_function(Fun) ->
+ parse_opts(R, Opts#evh{cb=CB});
parse_opts([callback|R], Opts) ->
parse_opts(R, Opts#evh{cb=self()});
parse_opts([{userData, UserData}|R],Opts) ->