Skip to content

Instantly share code, notes, and snippets.

View cdaven's full-sized avatar

Christian Davén cdaven

View GitHub Profile
@cdaven
cdaven / DeadlockController.cs
Created February 9, 2022 14:03
ASP.NET async Deadlock Example
using System.Threading.Tasks;
using System.Web.Mvc;
namespace DeadlockExperiment.Controllers
{
public class DeadlockController : Controller
{
public ActionResult Index()
{
AsyncMethod().Wait(); // Deadlock!
import matplotlib.pyplot as plt
import random
import numpy as np
from scipy.optimize import curve_fit
INITIAL_BUGS = 50
LINES_OF_CODE = 1000
TESTERS = 5
RUNS = 10