Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8501ee97 authored by Yu-Han Yang's avatar Yu-Han Yang
Browse files

Move thread creation to setCallback() from start()

This change only modifies the Cuttlefish emulator behavior.

Creating a new thread is a heavy operation. Doing so in start() slows
down the request handling. In a stress test like
testVariedRatesRepetitive, 100+ requests are received in a short time,
which results in accumulated requests waiting to be handled, and thus
breaks the subsequent tests.

This change moves creating a new thread from start() to setCallback()
to avoid thread creation for each new request.

Bug: 400325468
Test: atest CtsLocationGnssTestCases
Test: atest GtsLocationTestCases
Test: atest VtsHalGnssTargetTest
Change-Id: I6bf89989c572b0e7b1b9ba9339b922363ef26ce4
parent 8b12bc80
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment