all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: Emanuel Berg <moasen@zoho.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: try-this-for ?
Date: Fri, 19 Jan 2018 12:22:08 +0100	[thread overview]
Message-ID: <20180119112208.GI7809@tuxteam.de> (raw)
In-Reply-To: <86k1we2kh0.fsf@zoho.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, Jan 19, 2018 at 11:47:55AM +0100, Emanuel Berg wrote:
> tomas wrote:
> 
> > I'm actually enhancing one I wrote for
> > a customer ten years ago (C, GTK2). I have
> > written many of those. And I'm far from
> > a special snowflake.
> 
> Yes, I have also written them (in C and C++)
> but never thought it to be really common and
> even Emacs does it in a poor-man's way compared
> to Unix.

No. It delegates this stuff to the OS, which is
(most of the time) the Right Thing to Do.

> If a process cannot even be preempted

It can be preempted, see signal. But even if you
want to get signals right, the most straightforward
way is to queue the event to take care of it at a
point where your program is ready to deal with it.
An operating system basically does the same. No magic
here, either.
>                                         one might
> as well extend the definition of "scheduling" to
> a OO game loop that progresses the animation
> state of a bunch of sprites in a linked list...

Everyone does it that way. Whether you use a linked
list or (forced by priorities) a red-black tree or
a heap doesn't change the basic concept. I once had
a program collecting messages from SCADA systems. I
started with a linked list for events and told the
customer it would hold up for about 1000 sensors in
the field. Then he came back with... 10K sensors. I
had to change to a heap implementation.

> > It's not magic. It's pretty "classical" as
> > Unix goes
> 
> With Unix we think rather of PCBs, IPC, context
> switches, memory protection, different
> scheduling algorithms, on-the-fly and
> from-the-outside changes of priorities, and
> so on.

You try to delegate that to the OS: that's what it
is for. Even modern browsers, which have a dire need
for memory protection, just have separate processes
for that.

After all, I don't want even to think how to manage
things like the MMU from user space. Dragons is not
even an adequate description for that.

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlph1OAACgkQBcgs9XrR2kYgfgCfX2bEEoSAIQ014GI4N++2S2Q/
e58An0xhCRL4wbHg2BsvdiA3q7Z7bhgb
=TUck
-----END PGP SIGNATURE-----



      reply	other threads:[~2018-01-19 11:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17 21:04 try-this-for ? Emanuel Berg
2018-01-17 23:50 ` John Mastro
2018-01-18  2:08 ` Bob Newell
     [not found] ` <mailman.7535.1516241346.27995.help-gnu-emacs@gnu.org>
2018-01-18  2:52   ` Emanuel Berg
     [not found] ` <mailman.7534.1516233062.27995.help-gnu-emacs@gnu.org>
2018-01-18  2:56   ` Emanuel Berg
2018-01-18  9:27     ` tomas
     [not found]     ` <mailman.7540.1516267658.27995.help-gnu-emacs@gnu.org>
2018-01-18 12:00       ` Emanuel Berg
2018-01-18 12:03         ` Emanuel Berg
2018-01-18 12:11           ` Emanuel Berg
2018-01-18 12:43         ` tomas
2018-01-18 15:14           ` Eli Zaretskii
2018-01-18 15:23             ` tomas
     [not found]         ` <mailman.7544.1516279427.27995.help-gnu-emacs@gnu.org>
2018-01-18 12:59           ` Emanuel Berg
2018-01-18 13:16             ` tomas
     [not found]             ` <mailman.7546.1516281409.27995.help-gnu-emacs@gnu.org>
2018-01-18 22:44               ` Emanuel Berg
2018-01-19  8:38                 ` tomas
     [not found]                 ` <mailman.7613.1516351115.27995.help-gnu-emacs@gnu.org>
2018-01-19  8:55                   ` Emanuel Berg
2018-01-19  9:25                     ` tomas
     [not found]                     ` <mailman.7614.1516353949.27995.help-gnu-emacs@gnu.org>
2018-01-19 10:47                       ` Emanuel Berg
2018-01-19 11:22                         ` tomas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180119112208.GI7809@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=moasen@zoho.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.