[prev in list] [next in list] [prev in thread] [next in thread]
List: sbcl-devel
Subject: Re: [Sbcl-devel] Threads
From: Douglas Katzman via Sbcl-devel <sbcl-devel () lists ! sourceforge ! net>
Date: 2020-08-03 18:49:11
Message-ID: CAOrNasyDVYwRyEU8N64mz9FVdxNqEQit+PEde9G6CZb4Vj-fBg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
You should never need interrupt-thread. Even SBCL's internal use of
interrupt-thread is wrong in at least one very important case.
You may want to refresh your knowledge on the Model-View-Controller
paradigm and POSIX synchronization primitives and see how those translate
over to SB-THREAD.
On Mon, Aug 3, 2020 at 2:36 PM gwbennett <gwbennett@sentex.ca> wrote:
> Good afternoon from Greg Bennett, who is running sbcl-2.0.2 under linux
> mint 64bit,
> and who is using mcclim to provide graphics in the port a project.
>
> Much of the project involves interactions with and between graphical
> windows; it's the
> between part I write about.
>
> It is important that the windows not block the main thread, so I create
> these on their own
> threads.
>
> Suppose I intend to create 2 windows, one displaying a scatterplot of
> height vs weight of
> a sample of subjects, the other displaying a histogram of their ages. The
> project makes
> allowance for these to be linked in the sense that selecting/highlighting
> an age group causes
> the matching points of the scatterplot to be highlighted also.
>
> This means, I think, that a calculation made in the histogram thread has
> results which also
> need to be implemented in the scatterplot thread.
>
> As I think about implementing the general case of our windows, I wonder
> whether it will,
> therefore, make sense to have them all run on the same thread so that such
> linked
> calculations will be done on that one thread.
>
> Reading the SBCL manual, Section 13, it seemed to me that to run all our
> windows on one
> thread, I would need to use interrupt-thread to "add" a new window to an
> existing thread.
> Interrupt-thread comes with a stern warning about its use in production
> environments,
> so perhaps I am not thinking about the issue of how/where the results of
> calculations are
> available.
>
> Thanks in advance for clarifications and advice.
>
> Cheers /Greg
> _______________________________________________
> Sbcl-devel mailing list
> Sbcl-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sbcl-devel
>
[Attachment #5 (text/html)]
<div dir="ltr">You should never need interrupt-thread. Even SBCL's internal \
use of interrupt-thread is wrong in at least one very important case.<div>You may \
want to refresh your knowledge on the Model-View-Controller paradigm and POSIX \
synchronization primitives and see how those translate over to \
SB-THREAD.</div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Mon, Aug 3, 2020 at 2:36 PM gwbennett <<a \
href="mailto:gwbennett@sentex.ca">gwbennett@sentex.ca</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<font face="Helvetica, Arial, sans-serif">Good afternoon from Greg
Bennett, who is running sbcl-2.0.2 under linux mint 64bit,<br>
and who is using mcclim to provide graphics in the port a project.<br>
<br>
Much of the project involves interactions with and between
graphical windows; it's the<br>
between part I write about.<br>
<br>
It is important that the windows not block the main thread, so I
create these on their own<br>
threads. <br>
<br>
Suppose I intend to create 2 windows, one displaying a scatterplot
of height vs weight of<br>
a sample of subjects, the other displaying a histogram of their
ages. The project makes<br>
allowance for these to be linked in the sense that
selecting/highlighting an age group causes<br>
the matching points of the scatterplot to be highlighted also.<br>
<br>
This means, I think, that a calculation made in the histogram
thread has results which also<br>
need to be implemented in the scatterplot thread.<br>
<br>
As I think about implementing the general case of our windows, I
wonder whether it will,<br>
therefore, make sense to have them all run on the same thread so
that such linked<br>
calculations will be done on that one thread.<br>
<br>
Reading the SBCL manual, Section 13, it seemed to me that to run
all our windows on one<br>
thread, I would need to use interrupt-thread to "add" a new window
to an existing thread.<br>
Interrupt-thread comes with a stern warning about its use in
production environments,<br>
so perhaps I am not thinking about the issue of how/where the
results of calculations are<br>
available.<br>
<br>
Thanks in advance for clarifications and advice.<br>
<br>
Cheers /Greg<br>
</font>
</div>
_______________________________________________<br>
Sbcl-devel mailing list<br>
<a href="mailto:Sbcl-devel@lists.sourceforge.net" \
target="_blank">Sbcl-devel@lists.sourceforge.net</a><br> <a \
href="https://lists.sourceforge.net/lists/listinfo/sbcl-devel" rel="noreferrer" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/sbcl-devel</a><br> \
</blockquote></div>
_______________________________________________
Sbcl-devel mailing list
Sbcl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic