摘要 |
PURPOSE: A method for providing an RPC(Remote Procedure Call) service by using coroutines and a device thereof are provided to minimize block of a thread based on the coroutines, thereby a plurality of RPC requests by using the small number of threads. CONSTITUTION: A first thread starts a coroutine(330). The coroutine executes registered RPC logic. When a spot which calls a yield among codes of the coroutine is executed, the first thread stops execution of the coroutine. A second thread restarts the coroutine by executing a next spot. A CPU(310) manages a coroutine pool. The first thread selects the coroutine in the coroutine pool. [Reference numerals] (AA) Coroutine; (BB) Manual scheduling; (CC) Kernel; (DD) Thread; (EE) Kernel scheduling; |