webview-exit

This commit is contained in:
2026-04-18 16:43:19 +02:00
parent ce72177973
commit debda73068

View File

@@ -297,15 +297,19 @@ void rkt_webview_cleanup()
// Cleaning up when exiting the current custodian is not enough. // Cleaning up when exiting the current custodian is not enough.
handler->verbose = true; handler->verbose = true;
sleep_ms(3000);
if (handler->valid) { if (handler->valid) {
if (handler->guard_thread != nullptr) {
if (handler->evt_cb != nullptr) { if (handler->evt_cb != nullptr) {
INFO0("Clearing evt_guard callback to null\n");
handler->evt_cb = nullptr;
} else {
INFO0("evt_guard callback is already null\n");
}
INFO0("Stopping evt_guard (enqueuing evt_guard_stop)\n"); INFO0("Stopping evt_guard (enqueuing evt_guard_stop)\n");
handler->event_queue->enqueue(EVT_GUARD_STOP); handler->event_queue->enqueue(EVT_GUARD_STOP);
INFO0("yielding current thread and hopefully activating evt_guard thread\n"); INFO0("yielding current thread and hopefully activating evt_guard thread\n");
YIELD(); YIELD();
sleep_ms(1000);
INFO0("joining guard thread\n"); INFO0("joining guard thread\n");
handler->guard_thread->join(); handler->guard_thread->join();
INFO0("Deleting guard thread\n"); INFO0("Deleting guard thread\n");
@@ -378,7 +382,7 @@ void rkt_webview_init()
handler->name = buf; handler->name = buf;
handler->function_calls = 0; handler->function_calls = 0;
handler->events = 0; handler->events = 0;
handler->verbose = true; handler->verbose = false;
handler->shm_size = SHM_SIZE; handler->shm_size = SHM_SIZE;
handler->shm = new Shm(handler->name.data(), handler->shm_size, true); handler->shm = new Shm(handler->name.data(), handler->shm_size, true);