Skip to content

Commit

Permalink
shift initialization of atomic bools from header to constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
gisogrimm committed May 14, 2024
1 parent 3918637 commit 4dbcf62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libtascar/include/osc_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ namespace TASCAR {
std::string osc_srv_url;
std::string prefix;
lo_server_thread lost;
std::atomic_bool initialized = false;
std::atomic_bool isactive = false;
std::atomic_bool initialized;
std::atomic_bool isactive;
bool verbose = false;
std::map<std::string, data_element_t> datamap;
std::atomic<bool> runscriptthread;
Expand Down
2 changes: 2 additions & 0 deletions libtascar/src/osc_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,8 @@ osc_server_t::osc_server_t(const std::string& multicast,
bool verbose_)
: osc_srv_addr(multicast), osc_srv_port(port), verbose(verbose_)
{
initialized = false;
isactive = false;
runscriptthread = true;
cancelscript = false;
scriptthread = std::thread(&osc_server_t::scriptthread_fun, this);
Expand Down

0 comments on commit 4dbcf62

Please sign in to comment.