Mercurial > hg > orthanc
comparison OrthancServer/Sources/LuaScripting.cpp @ 5450:9ffd6d18daf3 pg-transactions
log lines now contain the thread name
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 05 Dec 2023 16:26:35 +0100 |
parents | 16cbfefa15e9 |
children | 1474fd6ea6c6 |
comparison
equal
deleted
inserted
replaced
5449:29858f424fc7 | 5450:9ffd6d18daf3 |
---|---|
774 } | 774 } |
775 } | 775 } |
776 | 776 |
777 void LuaScripting::HeartBeatThread(LuaScripting* that) | 777 void LuaScripting::HeartBeatThread(LuaScripting* that) |
778 { | 778 { |
779 Logging::SetCurrentThreadName("LUA-HEARTBEAT"); | |
780 | |
779 static const unsigned int GRANULARITY = 100; // In milliseconds | 781 static const unsigned int GRANULARITY = 100; // In milliseconds |
780 | 782 |
781 const boost::posix_time::time_duration PERIODICITY = | 783 const boost::posix_time::time_duration PERIODICITY = |
782 boost::posix_time::seconds(that->heartBeatPeriod_); | 784 boost::posix_time::seconds(that->heartBeatPeriod_); |
783 | 785 |
810 } | 812 } |
811 } | 813 } |
812 | 814 |
813 void LuaScripting::EventThread(LuaScripting* that) | 815 void LuaScripting::EventThread(LuaScripting* that) |
814 { | 816 { |
817 Logging::SetCurrentThreadName("LUA-EVENTS"); | |
818 | |
815 for (;;) | 819 for (;;) |
816 { | 820 { |
817 std::unique_ptr<IDynamicObject> event(that->pendingEvents_.Dequeue(100)); | 821 std::unique_ptr<IDynamicObject> event(that->pendingEvents_.Dequeue(100)); |
818 | 822 |
819 if (event.get() == NULL) | 823 if (event.get() == NULL) |