Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Coding

Keagan Van Rooyen Kvanrooyen

💻
Coding
View GitHub Profile
@Kvanrooyen
Kvanrooyen / profiles.json
Last active Jun 18, 2020
Windows Terminal Profile
View profiles.json
// This file was initially generated by Windows Terminal (Preview) 1.0.1402.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@Kvanrooyen
Kvanrooyen / multi-proc.py
Created May 22, 2019
Multi processing in Python
View multi-proc.py
# Testing of how multi processing works
# https://www.youtube.com/watch?v=ecKWiaHCEKs
"""
Multiprocessing:
- A new process is started independent from the first process
- Starting a process is slower than starting a thread
- Memory is not shared between processes
- Mutexes not necessary (unless threading in the new process)
- One GIL (Global Interpreter Lock) for each process
"""
@Kvanrooyen
Kvanrooyen / threading.py
Created May 22, 2019
Threading in Python
View threading.py
# Testing of how threading works
# https://www.youtube.com/watch?v=ecKWiaHCEKs
"""
Threading:
- A new thread is spawned within the existing process
- Starting a thread is faster than starting a process
- Memory is shared between all threads
- Mutexes often necessary to control access to shared data
- One GIL (Global Interpreter Lock) for all threads
"""
You can’t perform that action at this time.