diff options
author | Dan Gudmundsson <[email protected]> | 2015-07-07 10:38:38 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2015-07-07 10:38:38 +0200 |
commit | fcbc24440945a13b379b2b6135599c982bf8bdf0 (patch) | |
tree | 5c04db3494dfe5c196ab291da7bb2dcddadcf101 /lib/wx/api_gen | |
parent | 70cb9432dc03ac9435b2c8c5fe2e8fd0608015dc (diff) | |
download | otp-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.erl | 2 |
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) -> |