Flutter Engine
 
Loading...
Searching...
No Matches
flutter::IsolateNameServer Class Reference

#include <isolate_name_server.h>

Public Member Functions

 IsolateNameServer ()
 
 ~IsolateNameServer ()
 
Dart_PortEx LookupIsolatePortByName (const std::string &name)
 
bool RegisterIsolatePortWithName (Dart_PortEx port, const std::string &name)
 
bool RemoveIsolateNameMapping (const std::string &name)
 

Detailed Description

Definition at line 17 of file isolate_name_server.h.

Constructor & Destructor Documentation

◆ IsolateNameServer()

flutter::IsolateNameServer::IsolateNameServer ( )

Definition at line 9 of file isolate_name_server.cc.

9{}

◆ ~IsolateNameServer()

flutter::IsolateNameServer::~IsolateNameServer ( )
default

Member Function Documentation

◆ LookupIsolatePortByName()

Dart_PortEx flutter::IsolateNameServer::LookupIsolatePortByName ( const std::string &  name)

Definition at line 13 of file isolate_name_server.cc.

14 {
15 std::scoped_lock lock(mutex_);
16 return LookupIsolatePortByNameUnprotected(name);
17}
DEF_SWITCHES_START aot vmservice shared library name
Definition switch_defs.h:27

References flutter::name.

◆ RegisterIsolatePortWithName()

bool flutter::IsolateNameServer::RegisterIsolatePortWithName ( Dart_PortEx  port,
const std::string &  name 
)

Definition at line 28 of file isolate_name_server.cc.

29 {
30 std::scoped_lock lock(mutex_);
31 if (LookupIsolatePortByNameUnprotected(name).port_id != ILLEGAL_PORT) {
32 // Name is already registered.
33 return false;
34 }
35 port_mapping_[name] = port;
36 return true;
37}

References flutter::name.

◆ RemoveIsolateNameMapping()

bool flutter::IsolateNameServer::RemoveIsolateNameMapping ( const std::string &  name)

Definition at line 39 of file isolate_name_server.cc.

39 {
40 std::scoped_lock lock(mutex_);
41 auto port_iterator = port_mapping_.find(name);
42 if (port_iterator == port_mapping_.end()) {
43 return false;
44 }
45 port_mapping_.erase(port_iterator);
46 return true;
47}

References flutter::name.


The documentation for this class was generated from the following files: