edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev]  Threads
@ 2014-12-05 21:16 Karl Dahlke
  2014-12-05 22:05 ` Adam Thompson
  0 siblings, 1 reply; 11+ messages in thread
From: Karl Dahlke @ 2014-12-05 21:16 UTC (permalink / raw)
  To: Edbrowse-dev

I think a seg fault in any thread brings down the entire process -
so perhaps leaning a little towards separate processes,
if we do separate functionality.
Can still use ipc, in its various forms, for communication,
even common memory for global or session variables,
though I don't know how well ipc ports to windows.
Sure, processes are less efficient than threds,
but we're not doing a number crunching simulation here.

Karl Dahlke

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [edbrowse-dev] Threads
@ 2019-08-27  7:19 Karl Dahlke
  2019-08-28  1:30 ` Geoff McLane
  0 siblings, 1 reply; 11+ messages in thread
From: Karl Dahlke @ 2019-08-27  7:19 UTC (permalink / raw)
  To: edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 1987 bytes --]

Folks, it has happened; i'm using threads for asynchronous downloads instead of processes.
The word fork is not to be found in the edbrowse source!

There are two places this occurs.

1. Download files in background.
This is not the default.
Use the bg command to turn this on.
Usually when a file is large and you just want to let it run in the background.
Type bglist for a list of the background jobs.
Careful, it's not a separate process, so if you quit edbrowse before the download is complete, it just stops and doesn't finish.

2. Download all the javascript files in the background and in parallel.
These can be large files so I'm hoping this speeds things up.
This is on by default because you usually want it, besides,
I really need folks to test it under various conditions
and find any weird race conditions or thread unsafe code or seg falts etc.
It works with curl+gnutls, which the process implementation never did.

Both of these have lots of corner cases, especially #1.
Download ftp files, gopher files, https files, several at onces, some large,
does it all work? Do they interact with each other?
Does the bglist command work?
Does it show the sizes of the downloads in progress?
Does a foreground download still give you the dots?

Are javascript files pulled from cache or put into cache, even when they download in background?
(This is important.)

Then there is a whole host of followup work, like putting off the async scripts til the end,
and maybe starting the js fetches even earlier at parse time,
and maybe fetching css files in background (which isn't done yet),
and on and on.
But first let's make sure I didn't break all sorts of things with this commit.

Set db3 and you'll see all the fetches and http codes etc in a jumbled order as the files are loaded.
Type jsbg to go back to a sserial order.

I've never touched posix threads before so give me a pat on the back for diving into something new.

Karl Dahlke

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [Edbrowse-dev] Threads
@ 2014-12-05 19:29 Karl Dahlke
  2014-12-05 20:32 ` Adam Thompson
  0 siblings, 1 reply; 11+ messages in thread
From: Karl Dahlke @ 2014-12-05 19:29 UTC (permalink / raw)
  To: Edbrowse-dev

Honestly, it sounds like it adds a lot of work to a project that is already
a lot of work, and there's only three of us.
I think the goal is to have js not seg fault and not infinite loop,
and then there's no issue.
That is probably something we can achiev,
perhaps more easily with an engine that is less persnickety
and more intuitive than mozilla.
I recommend making the switch first, and if we still have issues,
we can change the function calls to ipc calls later, if need be,
but I don't think we're going to have these kinds of issues.
Hope not anyways.

Karl Dahlke

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [Edbrowse-dev] threads
@ 2014-03-21 22:56 Karl Dahlke
  2014-03-22 21:30 ` Adam Thompson
  0 siblings, 1 reply; 11+ messages in thread
From: Karl Dahlke @ 2014-03-21 22:56 UTC (permalink / raw)
  To: Edbrowse-dev

To maintain the thread on an email list,
save the mail you want to reply to unformatted,
edit the email, browse, type re or rea,
note the second line, it's a reference line,
this is what is needed to maintain the thread.

Karl Dahlke

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-08-28  4:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-05 21:16 [Edbrowse-dev] Threads Karl Dahlke
2014-12-05 22:05 ` Adam Thompson
  -- strict thread matches above, loose matches on Subject: below --
2019-08-27  7:19 [edbrowse-dev] Threads Karl Dahlke
2019-08-28  1:30 ` Geoff McLane
2019-08-28  1:48   ` Karl Dahlke
2019-08-28  3:51     ` Kevin Carhart
2019-08-28  4:16       ` Karl Dahlke
2014-12-05 19:29 [Edbrowse-dev] Threads Karl Dahlke
2014-12-05 20:32 ` Adam Thompson
2014-03-21 22:56 [Edbrowse-dev] threads Karl Dahlke
2014-03-22 21:30 ` Adam Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).