/srv/irclogs.ubuntu.com/2008/05/12/#upstart.txt

Keybukthat'll be the last thing I do :-)00:00
sadmacKeybuk: I haven't crashed it yet. only interesting thing I've done is create 1000 jobfiles at once00:23
Keybukdid it work and load them all?00:24
sadmacKeybuk: they all got loaded. Seemed to take a second to state such in the terminal00:24
Keybukprobably just the terminal ;)00:26
sadmaccould be00:26
ion_I really wish terminals were better with that. IMO a terminal should *never* cause an application printing text to block.00:29
ion_And a terminal should skip stuff when needed.00:30
sadmacion_: eew.00:30
sadmacI don't want information going missing unexpectedly00:30
Keybukion_: it only blocks the app if the app using blocking io for stdout ;)00:31
ion_Sorry, i wasn’t clear. Text going to the buffer and the buffer being rendered should be two separate things, where the the rendering part could just pause for a short while when it’s too slow.00:32
Keybukisn't that what happens mostly now?00:33
Keybukit doesn't really matter either way00:33
ion_Well, something like that, yes, but still ruby -e '10000.times { puts "bar" }' is *much* slower than the same with >/dev/null00:34
Keybukwhat if you set it non-blocking?00:35
ion_Then the write calls seem to fail with EAGAIN. I was unclear again: a terminal can cause the write to block as long as it takes to update the *buffer* (should be fast), but the *rendering* of the buffer to the screen should not cause it to block.00:42
Keybukwhy not?01:01
Keybukwhat if it was rendering a prompt which the user needed to respond to within a few seconds?01:02
Keybukprintf ("Press ^C within three seconds\n");01:02
Keybuksleep (3);01:02
Keybukyour suggestion would break that ;)01:02
ion_No, it wouldn’t. The prompt might just come to the screen sooner. :-)01:11
Keybukit'd come much later01:11
ion_The render code would attempt to always show the newest possible state of the buffer, lowering the update rate a bit if the rendering was lagging.01:12
Keybukhow can you show the newest state without rendering the previous state?01:12
Keybukterminal codes and all that01:12
ion_All that would be handled within the buffer, which is a non-rendered representation of the state.01:12
Keybukit seems like a needless optimisation01:13
ion_The slow part seems to be rendering vector fonts with pretty antialiasing.01:13
Keybukterminals like vte already only render the current buffer state01:13
Keybukand they still noticeably slow it down01:13
ion_Well, it still happens that you may have to wait ages for an application to receive a ^C if it’s printing a lot of stuff quickly.01:14
Keybukbut the printf won't unblock yet01:15
sadmacI've seen ruby display some interesting buffer properties lately01:17
sadmacI had an app that I wanted to print a . at every iteration of a loop01:17
sadmacI got no output until the app terminated, then I got all the .s at once01:18
Keybukthat's just line buffered output01:18
sadmacoh. Didn't know that line buffering applied to output. I thought that was input only01:18
sadmacguess it makes sense though01:18
Keybukcan apply to any fd01:18
Keybukstdout is line buffered by default01:19
Keybukas is stdin01:19
Keybukbut stderr isn't01:19
sadmac$stdout.flush would have taken care of it I'm guessing.01:19
sadmacKeybuk: is there a way to manually trigger events in trunk? or do we just have to wait for initctl?01:21
Keybukyou get a debug event when it starts01:21
Keybukand events for each job that you start as a result01:21
sadmacah01:22
Keybukwhich should be enough to set up any number of tests01:23
sadmacKeybuk: ahh01:24
sadmacKeybuk: so was there still a wire protocol for backup when the dbus service is unavailable, or was it that you use peer-to-peer dbus for this situation?01:26
Keybukpeer-to-peer dbus01:26
sadmacah01:27
Keybukconnect to unix:abstract=/com/ubuntu/upstart01:30
Keybuksame objects as if you sent over the system bus to com.ubuntu.Upstart01:30
sadmacvery good01:31
ion_sadmac: Alternatively, $stdout.sync = false01:32
sadmacion_: wouldn't it be sync = true?01:34
sadmacKeybuk: is it in any way possible to create an unlimited instance job?02:05
Keybuksadmac: no, can you think of a use for one?09:29
sadmac2Keybuk: I was trying to create an unlimited instance job so I could create a job that started on its own starting event and trigger itself an infinite number of times (with horrible results) :)13:40
Keybukwell, yes13:40
Keybukthat's kinda _why_ you can't do that ;)13:40
Keybukthe closest you can come is by having a job instanced on a UUID13:41
Keybukand passing that UUID in the start message or event13:41

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!