Unions.
E.g. the Russian Revolution (one of the main workers' requests in the events leading up to the Revolution was the 40 hour work week and fair treatment).
The unions were just a symptom to mediate the threat of violence in exchange for a larger share of the added value generated by the worker.