mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-28 01:52:29 -06:00
Threads do not wait for the server endpoint to call AcceptSession before returning from a ConnectToPort or GetServiceHandle call.
This commit is contained in:
parent
2eceee3a4c
commit
ed210c32b3
2 changed files with 5 additions and 3 deletions
|
@ -95,7 +95,8 @@ static void GetServiceHandle(Service::Interface* self) {
|
||||||
auto client_session = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
|
auto client_session = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
|
||||||
auto server_session = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
|
auto server_session = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
|
||||||
|
|
||||||
// TODO(Subv): Wait the current thread until the ServerPort calls AcceptSession.
|
// Note: Threads do not wait for the server endpoint to call
|
||||||
|
// AcceptSession before returning from this call.
|
||||||
|
|
||||||
// Add the server session to the port's queue
|
// Add the server session to the port's queue
|
||||||
client_port->AddWaitingSession(server_session);
|
client_port->AddWaitingSession(server_session);
|
||||||
|
|
|
@ -234,11 +234,12 @@ static ResultCode ConnectToPort(Handle* out_handle, const char* port_name) {
|
||||||
auto client_session = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
|
auto client_session = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
|
||||||
auto server_session = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
|
auto server_session = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
|
||||||
|
|
||||||
// TODO(Subv): Wait the current thread until the ServerPort calls AcceptSession.
|
|
||||||
|
|
||||||
// Add the server session to the port's queue
|
// Add the server session to the port's queue
|
||||||
client_port->AddWaitingSession(server_session);
|
client_port->AddWaitingSession(server_session);
|
||||||
|
|
||||||
|
// Note: Threads do not wait for the server endpoint to call
|
||||||
|
// AcceptSession before returning from this call.
|
||||||
|
|
||||||
// Return the client session
|
// Return the client session
|
||||||
CASCADE_RESULT(*out_handle, Kernel::g_handle_table.Create(client_session));
|
CASCADE_RESULT(*out_handle, Kernel::g_handle_table.Create(client_session));
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
|
|
Loading…
Reference in a new issue