recentpopularlog in

mcherm : threading   66

Idle Until Urgent — Philip Walton
A technique in JavaScript within the browser for speeding up app launch: create wrappers of slow-to-initialize objects which attempt to load during idle time, but instead load on the main thread if they are accessed.
threading  javascript  webdevelopment  concurrentprogramming  via:HackerNews 
september 2018 by mcherm
ffwd: delegation is (much) faster than you think | the morning paper
If done well, "only one thread accesses the data structure" can actually be the FASTEST multi-threaded data structure implementation because cache effects make the single thread go so much faster.
programming  via:HackerNews  concurrency  concurrentprogramming  algorithms  threading 
december 2017 by mcherm
MadCat — a heisenbug to share
I have no idea what this person is talking about. But it sounds cool.
performance  threading  bug  via:reddit 
february 2017 by mcherm
Some thoughts on asynchronous API design in a post-async/await world — njs blog
Comparison of some different libraries for doing asynchronous programming in the Python world. Makes the case that the curio library makes things far easier to get right by mandating that EVERYTHING use async/await instead of allowing callbacks.
programming  python  concurrency  concurrentprogramming  threading  asynchronous  via:HackerNews 
november 2016 by mcherm
Deciphering Glyph :: Unyielding
Author of Twisted comments that green threads aren't really any different from normal threads in terms of how difficult it is to write correct code using them.
concurrency  concurrentprogramming  threading  programming 
november 2016 by mcherm
MongoDB queries don’t always return all matching documents! — Meteor Engineering
If a record is being updated during a query it might not be returned, even if it matched before and after the change.
concurrentprogramming  threading  bug  programming  mongodb  database 
june 2016 by mcherm
java - What is the synchronization cost of calling a synchronized method from a synchronized method? - Stack Overflow
Answer to the question "Is there a meaningful performance cost to obtaining a lock when you already have it?"
java  threading  concurrency 
november 2015 by mcherm
Hacking Starbucks for unlimited coffee
He identified a race condition, and reported it responsibly. Got yelled at for doing so, too.
security  via:reddit  threading 
may 2015 by mcherm
Working simultaneously vs waiting simultaneously
You have apps that WAIT for many things at once, and those that do many CALCULATIONS at once. The former works well with languages like Go or Erlang; the latter works well with languages like C, or with SIMD in the extreme. This article explains why.
concurrency  concurrentprogramming  threading  parallelprogramming  via:HackerNews 
may 2014 by mcherm
Rewrites of the STM core model – again | Hacker News
I attempt to summarize the latest news in PyPy's implementation of software transactional memory.
mypostings  blogworthy  softwaretransactionalmemory  threading  ArminRigo  concurrentprogramming  pypy  via:HackerNews 
february 2014 by mcherm
PyPy Status Blog: STM with threads
Armin's no-GIL pypy is now running only 4x slower than the default version.
threading  python  parallelprogramming  ArminRigo  via:HackerNews  softwaretransactionalmemory 
june 2012 by mcherm
PyPy Status Blog: STM update: back to threads?
Armin explains that he's now using STM in PyPy to just provide normal threading, plus an ability to create a "transaction". It is course-grained, but he says that's OK. I tried reasoning about a common problem (web application threading) and found that it backed up his claim.
stm  softwaretransactionalmemory  python  pypy  mypostings  ArminRigo  programming  threading  concurrentprogramming  parallelprogramming  via:HackerNews 
may 2012 by mcherm
Andrew Munn - Google+ - Follow up to “Android graphics true facts”, or The Reason…
Why is iOS "smooth" while Android's UI is "laggy"? Because in iOS the rendering is done in a dedicated real-time priority thread, while in Android it is done in a normal-priority user thread. A few other things too.
via:reddit  threading  programming  performance  mobile  android 
december 2011 by mcherm
Dabeaz: An Inside Look at the GIL Removal Patch of Lore
A detailed look at an old patch to python 1.4 that eliminated the GIL.
programming  threading  python  via:googleplus 
october 2011 by mcherm
The problem with STM: your languages still suck
Software Transactional Memory (STM) doesn't play well with anything imperative or mutable. It's a natural for Haskell but every other programming language is in trouble. And it might be the only way to sanely use ever-increasing numbers of cores.
programming  functional  concurrency  haskell  stm  via:reddit  BrianHurt  threading  concurrentprogramming  parallelprogramming  softwaretransactionalmemory 
august 2011 by mcherm
We [PyPy] need Software Transactional Memory
Armin: PyPy has a GIL; to get rid of it we needs STM. Can’t do fine-grained locks like Jython because it’s hard to do; CAN do STM surprisingly easily because PyPy does whole-program transformations with ease. So he proposes trying to add STM to PyPy. He guesses 10x slowdown, perhaps 2x slowdown with serious optimization (wow… realistic expectations!) I think this is the sort of experiment that PyPy exists for, and is WELL worth trying.
via:reddit  ArminRigo  stm  pypy  parallellcomputing  threading  programming  computerscience  concurrency  concurrentprogramming 
august 2011 by mcherm
Reddit article on STM in pypy stm
I explain why “just don’t worry about it” is not a good approach to handling threading issues in the language.
mypostings  pypy  parallellcomputing  threading  via:reddit  programming 
august 2011 by mcherm
Why Events Are A Bad Idea (for high-concurrency servers)
Contrary to claims, threads > events. The 2 are duals and should be equal. Threads map to our brains better. BUT, most thread libraries/compilers suck; we made a good one to prove it's possible. Cooperative threading and compiler hints are essential.
concurrency  programming  architecture  scalability  research  asynchronous  threading  computerscience  via:reddit 
august 2011 by mcherm
Paul Tyma: Writing Java Multithreaded Servers - whats old is new (PDF Slides)
nio may actually performed WORSE than thread-per-connection in modern JVMs with good data structures.
java  programming  threading  concurrency  scalability  via:HackerNews  io  parallelprogramming  architecture 
april 2011 by mcherm
paxos_made_live.pdf (application/pdf Object)
The Paxos algorithm allows a group of cooperating servers to agree on a value even in the face of failing nodes and network failures. Google engineers built a real-world implementation of this which stores a reliable log (useful to build a reliable database). Interesting research learnings.
research  google  GoogleAppEngine  threading  programming  computerscience 
january 2011 by mcherm
Ned Batchelder: Global Django requests
A couple of ways to stash a "per-thread" object. Native support for ThreadLocal is one; building a dictionary keyed by Thread and storing it globally is another; this adds walking up the call stack until you find an instance.
programming  threading  concurrentprogramming  python  via:NedBatchelder  NedBatchelder 
august 2010 by mcherm
A Dismal Guide to Concurrency | Facebook
A nice overview of the state of concurrent programming: what the big problems are.
parallelprogramming  concurrentprogramming  programming  threading  concurrency  via:HackerNews 
april 2010 by mcherm
Dabeaz: The Python GIL Visualized
A picture showing just how the Python GIL operates on multiple cores. (Hint: Not well. It's not designed for that at all.)
python  programming  concurrency  concurrentprogramming  threading 
january 2010 by mcherm
memcpy() concurrency curiosities : David Dice's Weblog
When memcopy() overwrites fixed data with the same data, concurrent threads may briefly see changes to the values. This happens in actual cases and made some "immutable" data in Java (that got read via JNI) show intermittent changes. It's technically valid, but evil.
via:reddit  concurrency  concurrentprogramming  threading  programming  debugging  java 
may 2009 by mcherm
Events and Races : Fabulous Adventures In Coding
An example of a race condition and how it is confusing to understand but relatively easy to solve.
concurrency  threading  programming 
april 2009 by mcherm
Fabulous Adventures In Coding : Locks and exceptions do not mix
An excellent explanation of some gory details of handling locks and exceptions. Illustrates a time when deadlock might be what you WANT!
programming  threading  concurrency  exceptions  via:EricLippert  EricLippert 
march 2009 by mcherm
Windows & .NET Watch: Transaction crowd gets a boost - SD Times On The Web
Prediction: Software Transactional Memory (STM) is taking over, and it will eventually replace threading as the preeminent mechanism for concurrent programming.
LarryOBrien  via:LarryOBrien  programming  concurrency  concurrentprogramming  parallelprogramming  threading  softwaretransactionalmemory 
november 2008 by mcherm
Java theory and practice: Managing volatility
Brief description of "volitile" in Java. Includes some quite useful patterns of safe use for volitile.
java  concurrency  parallelprogramming  threading  patterns  programming 
october 2008 by mcherm
Cool Threads | I, Cringely . The Pulpit .
Cringely talks about threading. As usual, he doesn't *really* get it, but he presents it well anyhow. Curiously, he uses an example of optimistic concurrency where an ATM machine is accepting a deposit and has to spit the money back out. In the obvious withdrawal scenario, it can't suck the money back in!
cringely  concurrency  threading  parallelprogramming  optimisticconcurrency 
october 2008 by mcherm
Threadsafe Java Servlets - a solution : Dragons in the Algorithm
Description of an approach to storing data in a web application session without incurring threading problems.
myblog  mypostings  threading  parallelprogramming  java  webdevelopment  webdev 
october 2008 by mcherm
Threadsafe Java Servlets : Dragons in the Algorithm
My essay on why Java servlets have a threading problem with accessing data in the session.
myblog  mypostings  concurrency  threading  java  webdevelopment  webdev 
october 2008 by mcherm
Java theory and practice: Are all stateful Web applications broken?
Talks about web applications and threading. My blog entry on the subject touched on similar things.
java  threading  concurrency  webdevelopment  via:JoeCampbell 
september 2008 by mcherm
Higher-Order Fork/Join Operators
Tricky stuff... using monads to combine low-level parallelizable tasks into bigger parallelizable tasks. I didn't fully understand it.
scala  concurrency  threading  parallelprogramming  DanielSpiewak  via:DanielSpiewak 
september 2008 by mcherm
SYNCHRONOUS IO NEVER OK: Havoc's Blog September, 2008
Generally good advice: if you're building an interactive application (like, say, a browser), then never do IO in the main thread where it will lock up the application... not EVEN if the IO is "just tiny, and will be really quick".
programming  threading  concurrency  via:reddit 
september 2008 by mcherm
Thoughts About the Erlang Runtime :: Ian Bicking: a blog
What is important about Erlang's concurrency model, and could it be applied to Python? Perhaps, if you made functions and modules immutable and passed around some kind of data objects (not REAL objects).
programming  python  erlang  concurrency  threading 
june 2008 by mcherm
Minimizing Code Paths in Asychronous Code | Oliver Steele
"The general principle here is if a function sometimes has to call its callback asynchronously, always call it asynchronously, to minimize the number of possible code paths through the application."
programming  javascript  ajax  threading  parallelprogramming 
april 2008 by mcherm
Software Secret Weapons: Doug Lea is a Grandfather of all Scala Actors
Pavel Simakov looks at Scala's actors library (message passing) and asks how it works and whether it could be done in Java. The answer is (of course) "yes, but more verbosely".
scala  java  programming  threading  parallelprogramming  DougLea  concurrency 
april 2008 by mcherm
Paul Stovell says… » Locking Rule #71
We know locks should be obtained in a consistent order to avoid simple deadlock. But if you're calling into library code you don't own it might obtain the locks out of order. So never call code you don't own while holding a lock you don't own.
programming  threading  parallelprogramming  mypostings 
april 2008 by mcherm
Code Smart: Pod Racing: How to synchronize threads across multiple JVMs
Tools exist to synchronize threads withing the same JVM, but what if the threads live in multiple JVMs? Terracotta is a "network attached memory" tool that supports everything (including synchronization) in "memory" across the internet.
java  terracotta  programming  parallelprogramming  threading 
march 2008 by mcherm
Erlang-style concurrency - comp.lang.functional | Google Groups
A rather insightful summary of what the key features are of Erlang's approach to parallel programming.
programming  languagedesign  erlang  parallelprogramming  threading 
february 2008 by mcherm
the.codist{} - Writing Multithreaded Code Is Like Juggling Chainsaws
Watch out: avoiding deadlocks isn't *too* difficult, and protecting shared data can be done if you're careful, but threaded programmers still need to worry about making sure that all the threads are busy rather than all waiting for something.
threading  java  programming  parallelprogramming 
february 2008 by mcherm
Diploma Thesis: An Object-Oriented Programming Model for Event-Based Actors
The thesis which lead to the creation of Scala's Actor model, a useful approach to parallel programming which can run on the JVM but is NOT the same as the threading model.
programming  scala  articles/programming  parallelprogramming  threading 
january 2008 by mcherm
The Byzantine Generals Problem at Mark Nelson
A useful explanation of the solution to the Byzantine Generals problem (agreement among not-necessarily-trustworthy participants in a decision).
programming  computerscience  algorithm  parallelprogramming  algorithms  threading 
september 2007 by mcherm
Double Checked Locking (fixed!)
How to do double checked locking in the new Java memory model.
programming  java  threading  doublecheckedlocking 
may 2007 by mcherm
Parallel Programming Fun with Loop Carried Dependencies | Thinking Parallel
Interesting article on a pitfall in threading: the time to launch new threads was large enough that the parallel process took longer to execute.
programming  threading 
may 2007 by mcherm
Immutability doesn't guarantee thread safety « Blog of Peter Veentjer
Immutable objects are not threadsafe. Initialization might be reordered. Fix by declaring final.
java  threading 
march 2007 by mcherm
What really happened on Mars?
A problem with threading occurred on the Mars Rovers. The problem was successfully diagnosed and then resolved, solely because debugging-level information was left active on the system. Excellent story with lessons for programmers.
debugging  bug  space  threading  programming 
january 2007 by mcherm
Lightweight Memory Transactions in Java
More advanced research paper on memory transactions as a threading mechanism that implements it in Java.
articles/programming  Microsoft  threading  memory  java 
october 2005 by mcherm
Composable Memory Transactions
Article from Microsoft research in which they propose transaction memory instead of locks. They implement it in Haskell, and manage to make transactions composable.
articles/programming  threading  memory  haskell 
september 2005 by mcherm
On Threads
Sun's new chips will use heavy in-hardware threading.
personal_net  threading  hardware 
june 2005 by mcherm

Copy this bookmark:

to read