« first day (1204 days earlier)      last day (1655 days later) » 

6:47 PM
libuv/uvw: am I opening a can of worms undefined behavior by creating a new timer from a job (uv_queue_work)? I appear to consistently use ~1 second less time than I expect (2 second sleep followed by a 5 second timeout should yield 7 seconds from the job starts to the timer is triggered, but that doesn't happen - the timer only spends 4 seconds in the timeout). Changing the wait time on the timeout generally yields one second less waiting time when it's made inside the job.
 
7:45 PM
@Zoethetransgirl at the danger of sounding stupid, what does the documentation say?
My biggest concern would be leaking resources by tearing off new timers over and over again. It's worth noting that 'precise' timers are hard to do on any OS due to time slicing
 
it doesn't. The documentation is extremely thin for both libraries
 
color me surprised 🙄, whelp off to the source or freenode then...
I'd check the resource patterns in the source, but if you're looking for accuracy that's always going to be an issue.
 
It also isn't an accuracy problem within a scope worth looking away from. It's not a matter of milliseconds and potential delays because of other tasks - there's an entire missing second that disappears when the timer is started in a job. It should work, but I'm not entirely sure where it fails.
 
lack of documentation works great for agile projects when you're delivering constantly. Not so great for libraries
@Zoethetransgirl I have some hunches, but without checking the source it's hard to say. Right now I'll avoid speculating.
as for the concern about UB, I didn't look that closely
 
Maybe it's a threading issue? uv_queue_work is made on another thread, so affecting a loop in the main thread might be a cause. really weird for that to make a second disappear though
 
7:53 PM
@Zoethetransgirl depends, lots of thread pools use lockless algorithms so the work threads stay sleeping most of the time and only wake up every second or so to check the lockless queue
some you can change that or bypass it
 
Yeah, but it would still modify an object on another thread. libuv is said not to be thread safe
 
so you're request may be 'best effort'
 
managed to find some form of PDF documentation. There's (at least) one function with an annotation saying it's not thread safe, and it's the method closing the loop - one I don't use.
 
Hi
I am trying to auto-deduce a type of a function whose return type is also auto-deduced
for example auto myFunction(...)
I need my variable to equal the return type of that function like:
auto myVar = <the return type of myFunction()>
 
8:00 PM
but I don't want to initialize it yet so I don't want to do auto myVar = myFunction()
I just want to declare it
 
/sigh and this is why I don't use libuv all that much. TBF I'm usually on windows anyway
in which case libUV is pointless
4 messages moved from Lounge<C++>
@J.L.Louis decltype IIRC
 
I'm gonna see if I can use uv_async_send. It's supposed to call the supplied callback on the loop thread anyway. /shrug
 
8:17 PM
Thanks @Mgetz
 
That did the trick - might've been threading. I can't understand why creating it on another thread made a second disappear, but as long as it works, I guess that's good enough. Shouldn't be a problem from timeouts and intervals fortunately, it's just jobs. Oh well, at least it wasn't too bad to fix when I figured out what the problem was. Thanks for the help ^^
 
@Zoethetransgirl I'm glad I could be your 🦆
there is also not a rubber duck emoji
 
There isn't?
oh well, close enough ^^"
 
well at least not in win10's emoji keyboard
 
I think Samsung added one at some point
 
8:32 PM
someone wrote a paper once about emoji dialects
quite amsuing
 
Yeah. The usage of emojis is kinda fascinating though
 

« first day (1204 days earlier)      last day (1655 days later) »