@@ -9,6 +9,33 @@ const os = std.os;
9
9
const posix = os .posix ;
10
10
const windows = os .windows ;
11
11
12
+ // 06:52 <kristate> andrewrk: thinking about breaking-up the loop into separate
13
+ // files for each platform. importing event.loop will import the correct
14
+ // implementation for each OS and we will test the unified API in several test
15
+ // blocks inside of event.loop -- there is just too much custom code between the
16
+ // platforms and with threads, I want to make sure we get this right.
17
+ // 06:53 <kristate> andrewrk: it's not as bad as you might imagine. only downside
18
+ // is if we find a bug in one implementation, we will have to make sure to track
19
+ // it down for each other files -- BUT, if we add the appropriate test case for
20
+ // that bug, we should be able to run against all implementations and if the bug
21
+ // does not show, then so be it
22
+ // 06:54 <kristate> andrewrk: I think that this is going to be important as we go
23
+ // forward -- defining the interface as tests in an index file, and then making
24
+ // sure the tests pass in each implementation
25
+ // 07:20 <andrewrk> kristate, I implemented the darwin file system stuff (not the
26
+ // watching yet) in my async-fs branch
27
+ // 07:20 <andrewrk> I went the other direction with it - not having different
28
+ // files
29
+ // 07:20 <kristate> andrewrk: yes, I see that -- but when we add FS watching in,
30
+ // things will get messy with CFLoopRun
31
+ // 07:20 <andrewrk> I think it's better to have the same function definitions and
32
+ // types in one file, and that can switch out and import os-specific files if
33
+ // necessary
34
+ // 07:23 <andrewrk> kristate, I see, alright my mind is open to your way
35
+ // 07:23 <andrewrk> sorry I gotta get some sleep, I'll be back in ~8 hours
36
+ // 07:24 <kristate> okay, yeah -- please rest well. I will try to get something
37
+ // hacked out with FS watch
38
+
12
39
pub use switch (builtin .os ) {
13
40
builtin .Os .linux = > @import ("loop/linux.zig" ),
14
41
builtin .Os .macosx = > @import ("loop/darwin.zig" ),
0 commit comments