androidui
androidui
Explore posts from servers
CC#
Created by androidui on 1/25/2024 in #help
thread-safe concurrent task compilation system
https://gist.github.com/mgood7123/878b7c2988372838c51d11ee4fad84c3 how can i correctly set up locking and cancellation points for this? the basic idea is that we call reload for each file to be compiled/recompiled, and we call invoke_callback which will invoke methods for any successfully compiled file reload is called via FileSystemWatcher invoke_method is called from user code (eg, our app) reload launches a separate compilation task to avoid stalling the file watcher while compiling files an attempt to reload during an active compilation should cancel the current compilation and start a new compilation an attempt to unload during an active compilation should cancel the current compilation upon a successful compilation, we execute a callback which is called in the compilation thread, outside of the file watcher thread this callback should also handle cancellation if an unload or reload is triggered and we (the callback) have not yet finished invoke_callback will invoke the specified callback for all succesfully compiled scripts, and should not handle unload and reload events as we expect the methods being called to correctly handle the cancellation event of the passed cancellation token how can i correctly address all of the above ?
2 replies
CC#
Created by androidui on 11/29/2022 in #help
❔ send socket to UNRELATED process (NO FORKING, NO CHILD PROCESSES)
how would one send a socket to another process? eg server creates socket client connects to this socket client sends server sockets that client creates
5 replies
CC#
Created by androidui on 9/13/2022 in #help
explicit null param
is there a way to specify an explicit overload for null ? eg foo(object_a); // object overload foo(null); // null overload eg, equivilant to C++'s std::nullptr_t specifically to avoid
foo(C_A);
foo(C_B);
foo(null); // ambigous overload
foo(C_A);
foo(C_B);
foo(null); // ambigous overload
7 replies
CC#
Created by androidui on 9/3/2022 in #help
raw string vs verbatin string [Answered]
what is the difference between @" and """
22 replies
CC#
Created by androidui on 9/1/2022 in #help
stack
what class would i use for a stack? eg
stack.push(1);
stack.push(2);
stack.top() == 2;
stack.peek() == 2;
stack.pop();
stack.top == 1;
stack.peek() == 1;
stack.push(1);
stack.push(2);
stack.top() == 2;
stack.peek() == 2;
stack.pop();
stack.top == 1;
stack.peek() == 1;
4 replies
CC#
Created by androidui on 8/19/2022 in #help
BinaryReader and BinaryWriter api behaviour incompatibility
BinaryReader read(span<byte>) does not call read(byte[], int, int) but BinaryWriter write(span<byte>) DOES call write(byte[], int, int) is this expected behaviour?
6 replies
CC#
Created by androidui on 8/19/2022 in #help
serializer runtime type checking?
when writing a Serializer and Deserializer, how would i go about ensuring stuff written and read in the correct order and with expected read sizes and positions (eg in case serializing misses a field that is otherwise written) eg
ser() {
write();
write();
write();
write();
write();
}

des() {
read();
read();
read();
read();
// missing one here
}
ser() {
write();
write();
write();
write();
write();
}

des() {
read();
read();
read();
read();
// missing one here
}
18 replies