Subject: bug#42028: [Feature Request] 27.0.91; Provide the ability dynamic modules to post events in emacs event loop

From: yyoncho <[email-masked]>
Date: Wed, 24 Jun 2020 19:46:56 +0300

Here it is an example: If we oversimplify json parsing consist of 2 parts.

1. JSON parsing to Jansson data structures
2. Converting Jasson data structures to lisp data structures.

If we assume that 1 is taking most of the time then we could write the
following code:

start(string, callback) -> convert string to char* -> post it to worker
thread -> worker thread does the parsing
-> worker thread post to main loop -> main loop converts Jansson ds to lisp
ds -> main loop
calls the callback passed on start

The same strategy probably could be applied to Font locking with
TreeSitter.

Thanks,
Ivan

On Wed, Jun 24, 2020 at 7:29 PM Eli Zaretskii <[email-masked]> wrote:

> > From: yyoncho <[email-masked]>
> > Date: Wed, 24 Jun 2020 19:17:30 +0300
> > Cc: [email-masked]
> >
> > As a side note, this feature will be useful even for the core C part for
> anything
> > that wants to perform async processing not including LispObject.
>
> How will it help that?  The event queue is processed synchronously.
>