As soon as the ball is released, the inbounder can enter the court. Releasing the ball ends the 5-second count, so the restrictions on the thrower also go away at that time. That said, the throw-in does not end until the ball touches someone on the court or it goes out of play.