Make thread safe codes 42/262642/3
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 17 Aug 2021 04:07:53 +0000 (13:07 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 17 Aug 2021 10:40:31 +0000 (19:40 +0900)
commit1520ff9f66b23b4e6c6fb7a399c1e0bc53f3d673
tree3bf04bb243ec9f878d9b2e265ccf732eae87573e
parent02567231334ded62ea06506e0204001b6571039f
Make thread safe codes

The rpc_port_stub_h handle destroys in the main thread. The rpc-port
releases the handle using g_idle_add_full(). Before, the idler is added,
the Ignore() method is called to set nullptr to the event listener.
While calling the callback function, the rpc-port checks whether
the event listener is nullptr or not. If it's nullptr, the callback function
will be returned immediately.

Change-Id: I7728552c38173c548c07ce52c1339c6da9c4b29b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/rpc-port.cc
src/stub-internal.cc
src/stub-internal.hh