Launch every 100ms (#364)
This commit is contained in:
parent
3ffcfde9a3
commit
bd7ce8d0ca
@ -112,8 +112,10 @@ where
|
||||
println!("spawning on cores: {:?}", self.cores);
|
||||
|
||||
// Spawn clients
|
||||
for (index, (id, bind_to)) in core_ids.iter().enumerate().take(num_cores).enumerate() {
|
||||
let mut index = 0_u64;
|
||||
for (id, bind_to) in core_ids.iter().enumerate().take(num_cores) {
|
||||
if self.cores.iter().any(|&x| x == id) {
|
||||
index += 1;
|
||||
self.shmem_provider.pre_fork()?;
|
||||
match unsafe { fork() }? {
|
||||
ForkResult::Parent(child) => {
|
||||
@ -127,7 +129,7 @@ where
|
||||
self.shmem_provider.post_fork(true)?;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
std::thread::sleep(std::time::Duration::from_secs((index + 1) as u64));
|
||||
std::thread::sleep(std::time::Duration::from_millis(index * 100));
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
if let Some(filename) = self.stdout_file {
|
||||
|
Loading…
x
Reference in New Issue
Block a user