Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc cannot work with worker thread #41

Open
liuluheng opened this issue Jun 7, 2017 · 0 comments
Open

rpc cannot work with worker thread #41

liuluheng opened this issue Jun 7, 2017 · 0 comments
Assignees
Labels

Comments

@liuluheng
Copy link
Contributor

liuluheng commented Jun 7, 2017

test code

NPL.load("(gl)script/ide/System/Concurrent/rpc.lua");
local rpc = commonlib.gettable("System.Concurrent.Async.rpc");
rpc:new():init("Test.testRPC", function(self, msg) 
	LOG.std(nil, "info", "category", msg);
	msg.output=true; 
	ParaEngine.Sleep(1);
	return msg; 
end)

-- or not
Test.testRPC:MakePublic();

-- test with worker thread
Test.testRPC("(worker1)", {"input"}, function(err, msg) 
    echo(msg)
end);

outputs in log.txt

NPL bin dir: D:\code\npl\ParaCraftSDK-master\NPLRuntime\win\bin\
ParaEngine.sig file not found
WorkingDir: d:\code\npl\TableDB
Development directory is set to : d:/code/npl/TableDB/
OS information:
OS version:Microsoft  (build 9200), 64-bit
Number of processors:4
Processor type:586
TotalPhysicalMemory:8077284
FreePhysicalMemory:3325184

ParaEngine Root Dir is d:/code/npl/TableDB/
search path: d:/code/npl/TableDB/npl_packages/main/
./packages dir: D:\code\npl\ParaCraftSDK-master\NPLRuntime\win\packages\
Archive: D:\code\npl\ParaCraftSDK-master\NPLRuntime\win\packages\main_mobile_res.pkg is opened and read 613 entries
Archive: D:\code\npl\ParaCraftSDK-master\NPLRuntime\win\packages\main150727.pkg is opened and read 2652 entries
Archive: D:\code\npl\ParaCraftSDK-master\NPLRuntime\win\packages\main.pkg is opened and read 7536 entries
main loop: script/app/main.lua 
CAssetManifest loaded 0 files
CAsyncLoader is started with 1 IO thread and 2 worker thread
Absolute path is used for dll: PhysicsBT.dll
LoadLibrary (PhysicsBT.dll) failed with error 87: 参数错误。


Failed loading plug-in: PhysicsBT.dll

note: no physics engine found, null physics is used 
font Tahoma;12;bold is created 
font Tahoma;12;norm is created 
(main) state is now running in a separate thread. It is more responsive now. 
ParaEngine LuaJIT 32bits version:LuaJIT 2.0.3

Jit status:true, CMOV, SSE2, SSE3, SSE4.1, fold, cse, dce, fwd, dse, narrow, loop, abc, sink, fuse 

ffi loaded shared lib: ParaEngineClient
2017-06-07 22:42:06|main|debug|rpc|Test.testRPC installed to file rpc/Test.testRPC.lua
warning: script file rpc/Test.testRPC.lua not found
2017-06-07 22:42:16|10152|0|service is stopped|Line 39: void __thiscall ParaEngine::CParaEngineService::StopService(void):..\..\..\..\Client\trunk\ParaEngineClient\Core\ParaEngineService.cpp|
NPL State worker1 exited
		NPL thread local memory allocator released 327680 bytes
NPL State osAsync exited
		NPL thread local memory allocator released 327680 bytes
NPL State main exited
		NPL thread local memory allocator released 786432 bytes
CAsyncLoader worker thread 0 of 6 is exited
CAsyncLoader worker thread 1 of 6 is exited
CAsyncLoader worker thread 2 of 6 is exited
CAsyncLoader worker thread 3 of 6 is exited
CAsyncLoader worker thread 4 of 6 is exited
CAsyncLoader worker thread 5 of 6 is exited
CAsyncLoader IO thread is exited
@LiXizhi LiXizhi added the bug label Jun 7, 2017
onedou pushed a commit to NPLFoshan/npl_packages_main that referenced this issue Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants