Skip to content

Commit

Permalink
1.4 업데이트. 함수 동기화가 맞지 않는 부분 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
gellston committed Jun 11, 2021
1 parent e6c2e17 commit 49430f7
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This library provides remote function calls and variable sharing functions
This library was developed and modified with Visual Studio 2019 <br>

# Download
[https://github.com/gellston/Spider-IPC/releases/tag/1.3](https://github.com/gellston/Spider-IPC/releases/tag/1.3)
[https://github.com/gellston/Spider-IPC/releases/tag/1.4](https://github.com/gellston/Spider-IPC/releases/tag/1.4)


# Getting Started
Expand Down
26 changes: 25 additions & 1 deletion SpiderNative/SpiderNative/SipderIPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2518,6 +2518,8 @@ spider::function::function(std::string name, std::function<void(spider::function
DWORD write_handle_ret = WaitForSingleObject(this->pimpl->function_start_handle, INFINITE);



// mutex
spider::spider_raii raii_bloacker([&]() {
ReleaseMutex(this->pimpl->function_blocker);
});
Expand All @@ -2534,7 +2536,7 @@ spider::function::function(std::string name, std::function<void(spider::function
default:
break;
}

// mutex


switch (write_handle_ret) {
Expand Down Expand Up @@ -2594,6 +2596,28 @@ void spider::function::operator() () {
default:
break;
}


// mutex
spider::spider_raii raii_bloacker([&]() {
ReleaseMutex(this->pimpl->function_blocker);
});
DWORD blocker_ret = WaitForSingleObject(this->pimpl->function_blocker, INFINITE);
switch (blocker_ret) {
case WAIT_OBJECT_0:
break;
case WAIT_TIMEOUT:
throw std::exception("Time out");
break;
case WAIT_FAILED:
throw std::exception("Unexpected error");
break;
default:
break;
}
// mutex


}


Expand Down
Binary file modified lib/SpiderNative-x64-v120.zip
Binary file not shown.
Binary file modified lib/SpiderNative-x64-v142-windows10.zip
Binary file not shown.
Binary file modified lib/SpiderNative-x86-v120.zip
Binary file not shown.
Binary file modified lib/SpiderSharp-x64-NetCore3.1-windows10.zip
Binary file not shown.

0 comments on commit 49430f7

Please sign in to comment.