Automated updates: 2020-04-17

This commit is contained in:
John Colagioia 2020-04-17 17:54:09 -04:00
parent 206557363a
commit 8b04c3ad06
2 changed files with 101 additions and 4 deletions

View File

@ -51,7 +51,7 @@ const worker = new Worker(
);
```
Typically, threads are given functions to run. Worker threads are different, thoug, taking a *file*. This is where suspicion starts to come in, as sending execution to a separate file implies that the thread is a separate program, rather than a single program sharing state.
Typically, threads are given functions to run. Worker threads are different, though, taking a *file*. This is where suspicion starts to come in, as sending execution to a separate file implies that the thread is a separate program, rather than a single program sharing state.
#### Thread Handlers
@ -63,7 +63,7 @@ worker.on('error', this.reportUpdateError);
worker.on('exit', this.reportExit);
```
Each handler function takes a single parameter. The message can be an arbitrary object. The error is a JavaScript [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error). The exit code is an integer.
Each handler function takes a single parameter. The message can be an arbitrary object. The error is a JavaScript [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The exit code is an integer.
There is also an *online* handler, announcing when the thread has started execution, taking no parameters, if that's useful to you.
@ -87,7 +87,7 @@ This also works in the opposite direction, with the main thread sending messages
worker.postMessage(updateForTheThread);
```
These are surprising improvements over traditional threading libraries, because it allows the thread to easily send and *receive* updates whenever it gets them instead of waiting until it's out of work to return everything it has collected. *However*, this still smells of running in a separate process, basically treating the thread as a peer to coordinate with across a network connection or a special kind of shared file called a "pipe" that I won't bother to discuss, here.
These are surprising improvements over traditional threading libraries, because it allows the thread to easily send and *receive* updates whenever it gets them instead of waiting until it's out of work to return everything it has collected or messing around in shared memory. *However*, this still smells of running in a separate process, basically treating the thread as a peer to coordinate with across a network connection or a special kind of shared file called a "pipe" that I won't bother to discuss, here.
### Join
@ -105,7 +105,7 @@ So, after all that, I'm still not 100% convinced that worker threads are *actual
There's actually a lot more available, here, too. The threads can communicate through console I/O. A thread can set up additional communications channels, which can be passed to the parent for another thread, allowing two worker threads to communicate directly. Ports (endpoints to a communications channel) can be manipulated to prevent the thread from exiting, and so forth.
Like I said, though, we have our basic create-exit-join model *plus* communication back and forth, which is fairly useful for a lot of kinds of work. If they're not "really" threads, it doesn't matter much, as long as the code doesn't block and they basically at like threads.
Like I said, though, we have our basic create-exit-join model *plus* communication back and forth, which is fairly useful for a lot of kinds of work. If they're not "really" threads, it doesn't matter much, as long as the code doesn't block and they basically act like threads.
* * *

97
2020-04-17-week.md Normal file
View File

@ -0,0 +1,97 @@
---
layout: post
title: Tweets from 04/13 to 04/17
date: 2020-04-17 17:53:37-0400
categories: media
tags: [twitter, week, socialmedia, linkdump]
summary: Tweets for the Week of April 13th, 2020
thumbnail: /blog/assets/CLM_14456_71r_detail.png
---
As [discussed previously]({% post_url 2019-12-31-new-year %}), this is my weekly Twitter roundup. Note that tweets of articles generally include header images from the articles, which are not included here unless they *happen* to be available under a free license. Most are not. But I now add most of my commentary here, where I'm not restricted by the message length.
![diagrams showing the division of the day and of the week](/blog/assets/CLM_14456_71r_detail.png "diagrams showing the division of the day and of the week")
I also don't generally attach pictures to posts with quotations.
## 9:04 -- Mon 13 April 2020
[<i class="fab fa-twitter-square"></i>](https://twitter.com/jcolag/status/1249684763566211075) [The Democratic Party Must Harness the Legitimate Rage of Americans. Otherwise, the Right Will Use It With Horrifying Results.](https://theintercept.com/2020/04/05/coronavirus-american-politics-democratic-party-biden-sanders/) from The Intercept
> In unluckier countries, like Germany, Italy and Japan, the political left failed. The fury was organized by fascists, and directed at innocents.
## 12:05 -- Mon 13 April 2020
[<i class="fab fa-twitter"></i>](https://twitter.com/jcolag/status/1249730313615368193)
> You, a commander who has authority, are vilifying unjustly and oppress with your authority.
###### Zaynab bint Ali
## 9:01 -- Tue 14 April 2020
[<i class="fab fa-twitter-square"></i>](https://twitter.com/jcolag/status/1250046396306059265) [In Unprecedented Move, the U.S. Just Named a Bunch of Neo-Nazis a Terrorist Organization](https://www.vice.com/en_us/article/7kz3j4/in-unprecedented-move-the-us-just-named-these-neo-nazis-a-terrorist-organization) from VICE
> Christopher Wray said that the designation put those groups or individuals on the same footing as ISIS in terms of the resources the FBI will devote to them.
## 12:03 -- Tue 14 April 2020
[<i class="fab fa-twitter"></i>](https://twitter.com/jcolag/status/1250092198093152257)
> I am very much worried about the prisoners. Their large numbers and the condition of prisons make it certain that there must be many ailing persons among them.
###### Ali ibn Isa al-Kahhal
## 9:05 -- Wed 15 April 2020
[<i class="fab fa-twitter-square"></i>](https://twitter.com/jcolag/status/1250409791039721473) [Just 34% of Americans can work from home](https://www.futurity.org/how-many-people-can-work-at-home-covid-19-2328232/) from Futurity
> Social distancing is difficult for everyone, but some people and sectors are disproportionately hurt.
## 12:01 -- Wed 15 April 2020
[<i class="fab fa-twitter"></i>](https://twitter.com/jcolag/status/1250454082835243008)
> I will be harsh and stern against the aggressor, but I will be a pillar of strength for the weak.
###### Umar
## 9:02 -- Thu 16 April 2020
[<i class="fab fa-twitter-square"></i>](https://twitter.com/jcolag/status/1250771423766777856) [Whats the most ethical way to get grocery delivery?](https://www.fastcompany.com/90486800/whats-the-most-ethical-way-to-get-grocery-delivery) from Fast Company
> ...try to find an option that gives the most compensation and health protections to the delivery worker.
## 12:02 -- Thu 16 April 2020
[<i class="fab fa-twitter"></i>](https://twitter.com/jcolag/status/1250816722384367624)
> Virtue cannot be separated into male and female. ... The difference is one of bodies not of souls.
###### Theodoret
## 9:03 -- Fri 17 April 2020
[<i class="fab fa-twitter-square"></i>](https://twitter.com/jcolag/status/1251134063206948865) [Conservative Operatives Float Plan to Place Retired Military, Police Officers as GOP Poll Watchers on Election Day](https://theintercept.com/2020/04/11/republican-poll-watchers-vote-by-mail-voter-fraud/) from The Intercept
> Participants in the meeting also spoke of vote-by-mail initiatives as an impending threat to Republican power.
## 12:04 -- Fri 17 April 2020
[<i class="fab fa-twitter"></i>](https://twitter.com/jcolag/status/1251179613847519232)
> Too much straightforwardness is foolish against a shameless person.
###### Publilius Syrus
## Bonus
Because it accidentally became a tradition early on in the life of the blog, here's a sixth article that didn't fit into the week, but too weird to not mention.
<i class="fas fa-square"></i> [Hypothesis: Is COVID-19 severity tied to hair loss?](https://www.futurity.org/covid-19-men-severity-hair-loss-2329142/) from Futurity
> Wambier says a link between androgen hormones and COVID-19 could help to explain the higher severity for men and have implications for how health care providers test and treat patients.
* * *
**Credits**: Header image is [Circular diagrams showing the division of the day and of the week](https://en.wikipedia.org/wiki/Week#/media/File:CLM_14456_71r_detail.jpg) from a manuscript drafted during the Carolingian Dynasty.