[mammoth] Run EndpointServer in its own thread.
This commit is contained in:
parent
caccb08e16
commit
c70b5b0753
4 changed files with 25 additions and 15 deletions
|
|
@ -26,7 +26,8 @@ uint64_t main(uint64_t init_port_cap) {
|
|||
server->CreateClient());
|
||||
check(stub.Register("denali", *client));
|
||||
|
||||
RET_ERR(server->RunServer());
|
||||
// FIXME: Add thread join.
|
||||
Thread server_thread = server->RunServer();
|
||||
|
||||
check(server_thread.Join());
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ uint64_t main(uint64_t port_cap) {
|
|||
|
||||
ASSIGN_OR_RETURN(auto server, YellowstoneServer::Create());
|
||||
Thread registration_thread = server->RunRegistration();
|
||||
Thread server_thread = server->RunServer();
|
||||
|
||||
uint64_t vaddr;
|
||||
check(ZAddressSpaceMap(gSelfVmasCap, 0, gBootDenaliVmmoCap, &vaddr));
|
||||
|
|
@ -21,7 +22,7 @@ uint64_t main(uint64_t port_cap) {
|
|||
server->CreateClient());
|
||||
check(SpawnProcessFromElfRegion(vaddr, glcr::Move(client)));
|
||||
|
||||
check(server->RunServer());
|
||||
check(server_thread.Join());
|
||||
check(registration_thread.Join());
|
||||
dbgln("Yellowstone Finished Successfully.");
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue