Updating managed object core data
When the file download completes, the main thread is signaled so it knows about it and can notify the user visually, and the thread performing the download closes down. I invite you to check out the section ‘Selecting the Right Pattern’ from the Microsoft Patterns & Practices page linked in the references below for more examples.If your processor has multiple cores, and your operating system supports it, creating a new thread will (or may by default) cause the new thread to be executed on an unused or least busy core.
To make the API as explorable as possible, accounts have test mode and live mode API keys.
There is no "switch" for changing between modes, just use the appropriate key to perform a live or test transaction.
The PHP library will then automatically send this key in each request. You can also set a per-request key like in the example below.
This is often useful for Connect applications that use multiple API keys during the lifetime of a process.
For example, suppose you want to perform a long file download from the internet, but don’t want to keep the user waiting while this happens.
Imagine how inconvenient it would be if we couldn’t browse other web pages while waiting for files to download!
So, we create a new thread (in the browser program for example) to do the download.
In the meantime, the main original thread keeps processing mouse clicks and keyboard input so you can continue using the browser.
Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors.