[I] /home/toad/repo/test > git log
commit 5722bd316a408006fe39042c14b131d0e42da4f3 (HEAD -> master)
Author: aodq <0@aodq.net>
Date: Wed Oct 27 17:53:08 2021 -0700
Revert "changes bob to joe"
This reverts commit d78d20190b2edfa25909a8f91f7a0a83ab7ed047.
commit d78d20190b2edfa25909a8f91f7a0a83ab7ed047
Author: aodq <0@aodq.net>
Date: Wed Oct 27 17:52:56 2021 -0700
changes bob to joe
commit e0397f9787a068274c03b629c4d2ca461cf54e81
Author: aodq <0@aodq.net>
Date: Wed Oct 27 17:52:37 2021 -0700
adds initial test
[I] /home/toad/repo/test > git diff HEAD~
diff --git a/test.txt b/test.txt
index 0870381..724b0fd 100644
--- a/test.txt
+++ b/test.txt
@@ -1 +1 @@
-hello there, my name is Joe.
+hello there, my name is Bob.
[I] /home/toad/repo/test > git diff HEAD~2
git diff HEAD~2
doesn't print anything because there is no difference from the initial and last commit, bc the second commit was revertedgit revert <commit-id>
std::thread([after, task]() {
std::this_thread::sleep_for(std::chrono::milliseconds(after));
task();
}).detach();
#include <mutex>
#include <thread>
#include <stdio.h>
int ProtectMe = 0;
std::mutex m;
static void f() {
bool breakloop = false;
while(breakloop) {
m.lock();
printf("test %d", ProtectMe);
if(ProtectMe >= 1000) {
breakloop = true;
}
m.unlock();
}
}
int main() {
std::thread t(f);
while(ProtectMe < 1000) {
m.lock();
ProtectMe++;
m.unlock();
}
t.join();
}
#include <mutex>
#include <thread>
#include <stdio.h>
int ProtectMe = 0;
std::mutex m;
static void f() {
bool breakloop = false;
while(!breakloop) {
m.lock();
printf("test %d", ProtectMe);
if(ProtectMe >= 1000) {
breakloop = true;
}
m.unlock();
}
}
int main() {
std::thread t(f);
while(ProtectMe < 1000) {
m.lock();
ProtectMe++;
m.unlock();
}
t.join();
}
use std::sync::{Arc, RwLock};
fn main() {
let protect_me = Arc::new(RwLock::new(0));
let protect_me_thread = Arc::clone(&protect_me);
let handle = std::thread::spawn(move || loop {
let protect_me_thread = protect_me_thread.read().unwrap();
if *protect_me_thread >= 1000 {
println!("reached target");
break;
}
});
while *protect_me.read().unwrap() < 1000 {
println!("adding one");
*protect_me.write().unwrap() += 1;
}
handle.join().ok();
}
rm -rf ../master-build
mkdir ../master-build
cd ../master-build
cmake ../master -DANTIBOT=ON -DWEBSOCKETS=OFF -DMYSQL=ON -DCLIENT=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo
make DDNet-Server map_convert_07 map_optimize
m_pNextTraverseEntity
is so susm_apFirstEntityTypes[ENTTYPE_CHARACTER]
is indeed 0x0[2021-10-27 10:21:06][server]: client dropped. cid=9 addr=<{X}> reason=''
[2021-10-27 10:21:06][game]: kill killer='9:Maybe.' victim='9:Maybe.' weapon=-3 special=0
[2021-10-27 10:21:06][chat]: *** 'Maybe.' has left the game
[2021-10-27 10:21:06][game]: leave player='9:Maybe.'
[2021-10-27 10:21:06][game]: kill killer='10:[D] Maybe.' victim='10:[D] Maybe.' weapon=-1 special=0
[2021-10-27 10:21:06][game]: kill killer='10:[D] Maybe.' victim='10:[D] Maybe.' weapon=-2 special=0
He leaves and his dummy dies in spikes and self kills afterwards ? XD[2021-10-27 10:21:06][server]: client dropped. cid=9 addr=<{X}> reason=''
[2021-10-27 10:21:06][game]: kill killer='9:Maybe.' victim='9:Maybe.' weapon=-3 special=0
[2021-10-27 10:21:06][chat]: *** 'Maybe.' has left the game
[2021-10-27 10:21:06][game]: leave player='9:Maybe.'
[2021-10-27 10:21:06][game]: kill killer='10:[D] Maybe.' victim='10:[D] Maybe.' weapon=-1 special=0
[2021-10-27 10:21:06][game]: kill killer='10:[D] Maybe.' victim='10:[D] Maybe.' weapon=-2 special=0
He leaves and his dummy dies in spikes and self kills afterwards ? XD