void BufferNeeded(object sender, EventArgs e) { // Update the buffer in a different thread updateBuffer(""); }