MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / do_work

Function do_work

unittests/multithreaded_test.cpp:22–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22void do_work(chaiscript::ChaiScript_Basic &c, const size_t id)
23{
24 try{
25 std::stringstream ss;
26 ss << "MyVar" << rand();
27 c.add(chaiscript::var(5), ss.str());
28 ss.str("");
29 ss << id;
30 c.use("multithreaded_work.inc");
31 c("do_chai_work(4000, " + ss.str() + ");");
32 } catch (const std::exception &e) {
33 std::cout << "exception: " << e.what() << " thread: " << id;
34 }
35}
36
37int main()
38{

Callers

nothing calls this directly

Calls 5

varFunction · 0.85
addMethod · 0.45
strMethod · 0.45
useMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected