This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import os | |
import signal | |
import subprocess | |
import sys | |
import threading | |
from enum import Enum | |
from typing import Any, Optional | |
# Script to run multiple workers in parallel as sub-processes. Blocks until all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct BBTransferRate { | |
unsigned long bytesPerSecond; | |
NSTimeInterval duration; | |
}; | |
typedef struct BBTransferRate BBTransferRate; | |
BBTransferRate BBTransferRateMake(unsigned long bytesPerSecond, NSTimeInterval duration) | |
{ | |
BBTransferRate threshold; | |
threshold.bytesPerSecond = bytesPerSecond; |