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
fun <T> ReceiveChannel<T>.throttle( | |
settleTime: Long = 300, | |
scope: CoroutineScope | |
): ReceiveChannel<T> = scope.produce { | |
var job: Job? = null | |
consumeEach { | |
job?.cancel() | |
job = launch { | |
delay(settleTime) | |
send(it) |
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
#!/usr/bin/env python | |
""" | |
Get the toolchains path | |
""" | |
import argparse | |
import atexit | |
import inspect | |
import os | |
import shutil | |
import stat |
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
#!/bin/bash | |
set -e | |
set -x | |
# Set directory | |
SCRIPTPATH=`realpath .` | |
export ANDROID_NDK_HOME=$SCRIPTPATH/android-ndk-r20 | |
OPENSSL_DIR=$SCRIPTPATH/openssl-1.1.1c | |
# Find the toolchain for your build machine |