|
Cro: libraries and tools for building reactive services in Perl 6 | cro.services/ | Logs: irclog.perlgeek.de/cro/ Set by moderator on 19 March 2018. |
|||
|
01:50
stmuk_ joined
02:57
ilbot3 joined
|
|||
| moderator | Cro: libraries and tools for building reactive services in Perl 6 | cro.services/ | Logs: irclog.perlgeek.de/cro/ | ||
|
13:41
FROGGS joined
13:54
stmuk joined
14:40
FROGGS joined
|
|||
| FROGGS | jnthn: do you remember my mysql issue wrt multi threading? if you could tell me (even vague) what the ideal solution would be on a high level, I could start digging... | 14:42 | |
| I just think I can't do it without a direction | |||
| and of course I would favour a solution that would work without locks, so that we do not do just one request after the other has finished | 14:44 | ||
| jnthn | Well, I think step 1 is to carefully look through the mysql client docs to figure out what is and isn't threadsafe and also what needs doing. One thing I noticed is that it seemed to want every thread that a query was made on the init the library. | ||
| FROGGS | and, no hurry ;o) | ||
| k | 14:45 | ||
| jnthn | I figure one way to do that is to keep a "did we init for this thread yet" hash, which of course needs lock protection | ||
| Key it on the $*THREAD.id | |||
| FROGGS | okay, so far I understand | 14:46 | |
| jnthn | And use that to make sure we call the library init per thread | ||
| That should replace the library init that's happening at the moment | |||
| (the mechanism will work for the main thread too) | |||
| FROGGS | yeah | 14:47 | |
| that doesnt even sound to hard to do actually | |||
| jnthn | Yeah. I'd re-check the doc, there is a page on threading and how to get it right, and what objects are fine without having to treat them specially (turns out quite a few) | 14:48 | |
| FROGGS | awesome, thank you | 14:50 | |
| jnthn | FROGGS++ | ||
| FROGGS | \\m/ | ||
| japhb | jnthn: I now have a version of the react-redux-spa Dockerfile where I use your standard cro-http-websocket image, but then install nodejs and npm (plus their related node-* libraries) from the debian sid repo. Since sid is what Ubuntu is based on, it seems to work with pretty limited fallout (extra installed packages). Is that workable for you? | 22:43 | |
| jnthn | japhb: Yes :) | 22:45 | |
| I guess getting the instructions in will need a slight tweak of the template factoring so as to get the extra deps in | |||
| japhb | I think I can manage that. ;-) | ||
| Unless you're about to change them again yourself, that is. | 22:46 | ||
| jnthn | No, I won't be :) | ||
| japhb | OK, I'll prepare a PR next time I've got a few minutes. | 22:47 | |
| jnthn | japhb++ | 22:50 | |
| Probably will try and do a 0.7.4 later this week | 22:51 | ||
| japhb | jnthn: Is there any particular reason env-name strips digits? I was suprised when I called a test project 'test1' and got TEST__HOST/TEST__PORT | 23:07 | |
| jnthn | Um...hm. | 23:10 | |
| Possibly because somewhere it uses it in a - variable, and $test-1 won't work out well | |||
| But that'd be a different mangler | |||
| japhb | nodnod | 23:11 | |
| jnthn | Can't think of any reason not to fix it to keep the digits, anyway | 23:12 | |
| japhb | jnthn: OK, I'll include that in my changes | 23:15 | |
| PR, I mean | |||