alexmojaki / alexmojaki/sync-message

WebSockets

Offen
#1 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
15
Forks
5
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Creating this issue to initiate a brainstorm about the benefits and drawbacks of using WebSockets to communicate between the main and worker threads. It sounds like an efficient, direct way to communicate without needing a service worker or any shared memory. The biggest drawback I think is the need for a busy loop to poll the socket while waiting. If it doesn't have an explicit method to poll it, we might get stuck in an infinite loop while checking if our input variable is empty as we cannot use the socket at that point. I'm also not too familiar with WebSockets, so maybe permission errors arise when trying to open a socket on an application-specific URL.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.