GNU bug report logs -
#42028
[Feature Request] 27.0.91; Provide the ability dynamic modules to post events in emacs event loop
Previous Next
Full log
Message #17 received at 42028 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <eliz <at> gnu.org> wrote:
> > From: yyoncho <yyoncho <at> gmail.com>
> > Date: Wed, 24 Jun 2020 19:17:30 +0300
> > Cc: 42028 <at> debbugs.gnu.org
> >
> > 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.
>
[Message part 2 (text/html, inline)]
This bug report was last modified 4 years and 356 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.