Skip to content

Commit

Permalink
print threads
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhaddon committed Dec 7, 2023
1 parent 44ff710 commit 0c74b2c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Gaffer/Switch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
#include "boost/bind/bind.hpp"
#include "boost/bind/placeholders.hpp"

#include <thread>

using namespace boost::placeholders;
using namespace Gaffer;

Expand Down Expand Up @@ -309,6 +311,8 @@ void Switch::plugInputChanged( Plug *plug )
catch( ... )
{
std::cerr << "UNKNOWN ERROR IN Switch::plugInputChanged" << std::endl;
std::cerr << "THREAD IS " << std::this_thread::get_id() << std::endl;

int status;
std::cerr << "EXCEPTION TYPE IS " << abi::__cxa_demangle(abi::__cxa_current_exception_type()->name(), 0, 0, &status) << std::endl;;
throw;
Expand Down Expand Up @@ -360,7 +364,7 @@ size_t Switch::inputIndex( const Context *context ) const

std::cerr << "inputIndex 2 " << fullName() << std::endl;

const size_t index = indexPlug->getValue();
const size_t index = indexPlug->getValue(); // THROWING CANCELLED FROM HERE

std::cerr << "inputIndex 3 " << fullName() << std::endl;

Expand Down
4 changes: 4 additions & 0 deletions src/GafferModule/GafferModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@

#include "Gaffer/Backdrop.h"

#include <thread>

#ifdef __linux__
#include <sys/prctl.h>
#endif
Expand Down Expand Up @@ -201,6 +203,8 @@ __attribute__( ( section( ".init_array" ) ) ) decltype( storeArgcArgv ) *g_initA
BOOST_PYTHON_MODULE( _Gaffer )
{

std::cerr << "MAIN THREAD IS " << std::this_thread::get_id() << std::endl;

bindSignals();
bindGraphComponent();
bindContext();
Expand Down

0 comments on commit 0c74b2c

Please sign in to comment.