The NYC Board of Elections will hold a recount in the Democratic mayoral primary, and if de Blasio fails to garner 40.0% of the vote or more, he would be forced into a runoff with Bill Thompson. The NYC primary date, three weeks away, is set for October 1, if necessary.
The Board of Elections is expected to release its recount results early next week (the week of September 16 - 22). De Blasio currently has 40.2% of the vote, and if he can hold on to that margin, he would win the nomination outright. If he cannot, and falls below 40.0%, a recount would be triggered and the primary runoff election, on October 1, would determine the Democratic nominee (de Blasio is heavily favored, still, in such a scenario). The winner of the Democratic primary would eventually go on to compete against the Republican nominee, Joe Lhota, in the November 5 general election.