---
title: "UI Threading *Might* Suck"
url: "https://osherove.com/blog/2003/5/6/ui-threading-might-suck.md"
canonical: "https://osherove.com/blog/2003/5/6/ui-threading-might-suck.html"
published: "2003-05-06T07:06:00"
updated: "2003-05-06T07:06:00"
tags: [".Net Original"]
author: "Roy Osherove"
description: "This article clearly explains the troubles needed to go through in order to interact with a Winforms UI from a background thread. I found it when I started stumbling around with my own UI, having long operations…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# UI Threading \*Might\* Suck

By Roy Osherove May 6, 2003 In [.Net Original](https://osherove.com/blog/category/net-original)

**Historical article** · Originally published May 6, 2003; technical details may be outdated.

[This article](http://www.thecodeproject.com/csharp/winformsthreading.asp) clearly explains the troubles needed to go through in order to interact with a Winforms UI from a background thread. I found it when I started stumbling around with my own UI, having long operations processing in the background.

It helped, but why the hell must it be this cumbersome? Basically you need a delegate and a handler method for every UI related function you'd call from your back-thread. That's amazingly tedious.

I wonder how this process can be made shorter (and/or easier). Back to digging I guess..

Until I figure this one out - the title holds :)

## More in .Net Original

[All posts in .Net Original](https://osherove.com/blog/category/net-original)

- May 8, 2003

    ### [More About Using Undocumented API's](https://osherove.com/blog/2003/5/8/more-about-using-undocumented-apis.html)

- May 8, 2003

    ### [How Access 2003 Helped Me Out](https://osherove.com/blog/2003/5/8/how-access-2003-helped-me-out.html)

- May 6, 2003

    ### [Regular Expression Library](https://osherove.com/blog/2003/5/6/regular-expression-library.html)

- May 5, 2003

    ### [Oops! Typed Datasets ARE scalable!](https://osherove.com/blog/2003/5/5/oops-typed-datasets-are-scalable.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
