mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
inotify TODO
This commit is contained in:
parent
de8dc4cddb
commit
7fed451226
@ -399,6 +399,7 @@ int load_so(byteptr path) {
|
|||||||
void reload_so() {
|
void reload_so() {
|
||||||
int last = 0;
|
int last = 0;
|
||||||
while (1) {
|
while (1) {
|
||||||
|
// TODO use inotify
|
||||||
int now = os__file_last_mod_unix(tos2("$file"));
|
int now = os__file_last_mod_unix(tos2("$file"));
|
||||||
if (now != last) {
|
if (now != last) {
|
||||||
//v -o bounce -shared bounce.v
|
//v -o bounce -shared bounce.v
|
||||||
@ -406,7 +407,7 @@ void reload_so() {
|
|||||||
last = now;
|
last = now;
|
||||||
load_so("$so_name");
|
load_so("$so_name");
|
||||||
}
|
}
|
||||||
time__sleep_ms(1000);
|
time__sleep_ms(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
' )
|
' )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user