Skip to content

Instantly share code, notes, and snippets.

@seanfisher
seanfisher / AwaitTest.cs
Last active April 3, 2017 16:45
Does Changing a Shared Awaited Task Affect Things Already Awaiting It
using System;
using System.Threading.Tasks;
namespace AwaitTest
{
public class Program
{
private Task<int> _sharedTask;
public static void Main(string[] args)
@seanfisher
seanfisher / AsyncInitializationController.cs
Last active April 10, 2023 12:42
A pattern for a Xamarin.iOS controller that permits "safe" async lifecycle methods.
using System;
using System.Threading.Tasks;
using UIKit;
namespace Seanfisher.Gists
{
public abstract class AsyncInitializationController : UIViewController
{
Task _viewDidLoadAsyncTask = Task.CompletedTask;
public virtual Task ViewDidLoadAsync()
@seanfisher
seanfisher / ISQLiteAsyncConnection.cs
Last active November 7, 2017 22:07
Interface extracted from the source code of SQLiteAsyncConnection from SQLite.Net-PCL.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using SQLite.Net;
using SQLite.Net.Async;
namespace Seanfisher.Gists

Keybase proof

I hereby claim:

  • I am seanfisher on github.
  • I am sf (https://keybase.io/sf) on keybase.
  • I have a public key whose fingerprint is 08B3 F384 AD3B 012E 2CF7 EE19 27EB F594 0CF4 2891

To claim this, I am signing this object: