Skip to content

Commit

Permalink
Make callbacks synchronous again
Browse files Browse the repository at this point in the history
  • Loading branch information
psiberx committed Aug 4, 2024
1 parent 92b0f39 commit f0363bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/App/Callback/CallbackSystemHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ struct CallbackSystemHandler : Red::IScriptable

void operator()(const Red::Handle<CallbackSystemEvent>& aEvent)
{
std::unique_lock sync(callbackLock);

if (!registered || !valid)
return;

Expand Down Expand Up @@ -213,8 +215,10 @@ struct CallbackSystemHandler : Red::IScriptable
CallbackLifetime lifetime{CallbackLifetime::Session};
Core::Vector<Red::Handle<CallbackSystemTarget>> targets;
bool targeted{false};
bool valid{true};

Red::SharedSpinLock callbackLock;
bool registered{true};
bool valid{true};

RTTI_IMPL_TYPEINFO(App::CallbackSystemHandler);
RTTI_IMPL_ALLOCATOR();
Expand Down
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set_xmakever("2.5.9")

set_project("Codeware")
set_version("1.12.2", {build = "%y%m%d%H%M"})
set_version("1.12.3", {build = "%y%m%d%H%M"})

set_arch("x64")
set_languages("cxx2a")
Expand Down

0 comments on commit f0363bf

Please sign in to comment.